2023-04-18 14:40:42 +02:00
|
|
|
pipeline {
|
2023-03-25 13:40:54 +01:00
|
|
|
agent any
|
|
|
|
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
2023-04-18 15:13:26 +02:00
|
|
|
parameters([
|
|
|
|
string(
|
2023-04-18 15:13:44 +02:00
|
|
|
defaultValue: 'xx',
|
2023-04-18 15:13:26 +02:00
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
|
|
|
),
|
|
|
|
password(
|
|
|
|
defaultValue: '',
|
|
|
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
|
|
name: 'KAGGLE_KEY'
|
|
|
|
)
|
|
|
|
])
|
2023-04-18 15:35:14 +02:00
|
|
|
stages {
|
2023-03-25 13:40:54 +01:00
|
|
|
stage('Hello') {
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Goodbye!') {
|
|
|
|
steps {
|
|
|
|
echo 'Goodbye!'
|
|
|
|
//Zarchiwizuj wynik
|
|
|
|
archiveArtifacts 'output.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|