ium_s487182/Jenkinsfile-Docker

38 lines
1.0 KiB
Plaintext

node {
stage('Preparation') {
properties([
parameters([
string(
defaultValue: 'login',
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'
),
string(
defaultValue: '7999',
description: 'Cut off value',
name: 'CUT',
trim: false
)
])
])
}
stage('checkout: Check out from version control') {
checkout scm
}
stage('Build Docker image') {
steps {
sh 'docker build -t wujt89 -f Dockerfile .'
}
}
stage('sh: Shell Script') {
script {
sh 'docker run -v ${env.WORKSPACE}/artifacts:/app/artifacts wujt89 python3 ./create_dataset.py'
}
}
}