ium_444498/Jenkinsfile
2022-05-07 17:25:16 +02:00

35 lines
1.1 KiB
Groovy

pipeline {
parameters {
string (
defaultValue: 'wirus006',
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'
)
}
agent {
dockerfile {
additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} -t s444498-create-dataset"
}
}
stages {
stage('Archive dataset') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh 'echo hello world | figlet'
sh 'chmod a+rwx -R *'
sh 'pwd && ls'
sh 'ls /app/data/'
archiveArtifacts artifacts: '/app/data/*', onlyIfSuccessful: true
}
}
}
}
}