Jenkinsfile with Kaggle
This commit is contained in:
parent
b4b7c6c059
commit
759839d42d
@ -1,25 +1,27 @@
|
|||||||
node {
|
node {
|
||||||
stage('Preparation') {
|
stage('Preparation') {
|
||||||
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',
|
||||||
stage('Hello') {
|
name: 'KAGGLE_KEY'
|
||||||
//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('Build') {
|
||||||
stage('Goodbye') {
|
// Run the maven build
|
||||||
echo 'Goodbye!'
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||||
//Zarchiwizuj wynik
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||||
archiveArtifacts 'output.txt'
|
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||||
}
|
sh 'kaggle datasets list'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user