34 lines
1.1 KiB
Groovy
34 lines
1.1 KiB
Groovy
pipeline {
|
|
agent any
|
|
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
|
parameters{
|
|
string(
|
|
defaultValue: 'patluk',
|
|
description: 'Kaggle username',
|
|
name: 'KAGGLE_USERNAME',
|
|
trim: false
|
|
)
|
|
password(
|
|
defaultValue: 'password',
|
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
name: 'KAGGLE_KEY'
|
|
)
|
|
}
|
|
stages {
|
|
stage('Hello') {
|
|
steps {
|
|
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
|
echo "INPUT_TEXT: ${KAGGLE_USERNAME}"
|
|
//Wywołaj w konsoli komendę "figlet", która generuje ASCI-art
|
|
sh "figlet \"${KAGGLE_USERNAME}${KAGGLE_KEY}\" | tee output.txt"
|
|
}
|
|
}
|
|
stage('Goodbye!') {
|
|
steps {
|
|
echo 'Goodbye!'
|
|
//Zarchiwizuj wynik
|
|
archiveArtifacts 'output.txt'
|
|
}
|
|
}
|
|
}
|
|
} |