2023-04-18 14:54:06 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
2023-04-18 16:24:03 +02:00
|
|
|
parameters{
|
2023-04-18 15:37:40 +02:00
|
|
|
string(
|
|
|
|
defaultValue: 'patluk',
|
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
2023-04-18 16:24:03 +02:00
|
|
|
)
|
2023-04-18 15:37:40 +02:00
|
|
|
password(
|
2023-04-18 16:35:25 +02:00
|
|
|
defaultValue: 'password',
|
2023-04-18 15:37:40 +02:00
|
|
|
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 16:24:03 +02:00
|
|
|
}
|
2023-04-18 16:35:25 +02:00
|
|
|
stages {
|
2023-04-18 14:54:06 +02:00
|
|
|
stage('Hello') {
|
|
|
|
steps {
|
|
|
|
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
2023-04-18 16:35:25 +02:00
|
|
|
echo "INPUT_TEXT: ${KAGGLE_USERNAME}"
|
2023-04-18 14:54:06 +02:00
|
|
|
//Wywołaj w konsoli komendę "figlet", która generuje ASCI-art
|
2023-04-18 16:35:25 +02:00
|
|
|
sh "figlet \"${KAGGLE_USERNAME}${KAGGLE_KEY}\" | tee output.txt"
|
2023-04-18 14:54:06 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Goodbye!') {
|
|
|
|
steps {
|
|
|
|
echo 'Goodbye!'
|
|
|
|
//Zarchiwizuj wynik
|
|
|
|
archiveArtifacts 'output.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|