Jenkinsfile changes
This commit is contained in:
parent
0862d75dbe
commit
18b0af9ec4
40
Jenkinsfile
vendored
40
Jenkinsfile
vendored
@ -1,28 +1,40 @@
|
||||
pipeline {
|
||||
agent any
|
||||
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
||||
|
||||
parameters {
|
||||
string (
|
||||
defaultValue: 'Hello World!!!!!',
|
||||
description: 'Tekst, którym chcesz przywitać świat',
|
||||
name: 'INPUT_TEXT',
|
||||
trim: false
|
||||
)
|
||||
defaultValue: 'h7557h',
|
||||
description: 'Kaggle username',
|
||||
name: 'KAGGLE_USERNAME',
|
||||
trim: false
|
||||
),
|
||||
password (
|
||||
defaultValue: '926ee9d10da62b6d8448a80a49404be0',
|
||||
description: 'Kaggle token',
|
||||
name: 'KAGGLE_KEY',
|
||||
)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Hello') {
|
||||
stage('Build') {
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||
sh 'kaggle dataset list'
|
||||
}
|
||||
|
||||
stage('Split data') {
|
||||
steps {
|
||||
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
||||
echo "INPUT_TEXT: ${INPUT_TEXT}"
|
||||
//Wywołaj w konsoli komendę "figlet", która generuje ASCI-art
|
||||
sh "figlet \"${INPUT_TEXT}\" | tee output.txt"
|
||||
echo 'Split data'
|
||||
}
|
||||
}
|
||||
stage('Goodbye!') {
|
||||
|
||||
stage('Statistics!') {
|
||||
steps {
|
||||
echo 'Goodbye!'
|
||||
echo 'Statistics'
|
||||
|
||||
//Zarchiwizuj wynik
|
||||
archiveArtifacts 'output.txt'
|
||||
//archiveArtifacts 'statistics.txt'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user