ium_434732/Jenkinsfile
2021-04-10 18:38:19 +02:00

43 lines
1.3 KiB
Groovy

node {
stage('One') {
properties([
parameters([
string(defaultValue: '',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false),
password(defaultValue: '',
description: 'Kaggle token',
name: 'KAGGLE_KEY')
])
]
)
stage('Two') {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s434732/ium_434732']]])
checkout scm
def image = docker.build("image", "--build-arg KAGGLE_USERNAME='michakubiak'", "--build-arg KAGGLE_KEY='3578f7825d69300660f4cfa2eab3f6d4' .")
image.inside {
sh 'python3 ./skrypt_download.py'
}
}
}
}
}