Jenkinsfile with Kaggle
This commit is contained in:
parent
b4b7c6c059
commit
759839d42d
@ -3,23 +3,25 @@ node {
|
|||||||
properties([
|
properties([
|
||||||
parameters([
|
parameters([
|
||||||
string(
|
string(
|
||||||
defaultValue: 'Hello World!',
|
defaultValue: 'jaszwajcar',
|
||||||
description: 'Tekst do wyświetlenie',
|
description: 'Kaggle username',
|
||||||
name: 'INPUT_TEXT',
|
name: 'KAGGLE_USERNAME',
|
||||||
trim: false
|
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'
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
stage('Hello') {
|
stage('Build') {
|
||||||
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
// Run the maven build
|
||||||
echo "INPUT_TEXT: ${INPUT_TEXT}"
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||||
//Wywołaj w konsoli komendę "figlet", która generuje ASCI-art
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||||
sh "figlet \"${INPUT_TEXT}\" | tee output.txt"
|
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||||
|
sh 'kaggle datasets list'
|
||||||
}
|
}
|
||||||
stage('Goodbye') {
|
|
||||||
echo 'Goodbye!'
|
|
||||||
//Zarchiwizuj wynik
|
|
||||||
archiveArtifacts 'output.txt'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user