47 lines
1.5 KiB
Groovy
47 lines
1.5 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'),
|
|
string(defaultValue: '5000',
|
|
description: 'Data cutoff',
|
|
name: 'CUTOFF',
|
|
trim: false)
|
|
])
|
|
]
|
|
)
|
|
stage('Two') {
|
|
|
|
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}" ]) {
|
|
|
|
|
|
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="${params.KAGGLE_USERNAME}", KAGGLE_KEY="${params.KAGGLE_KEY}"")
|
|
image.inside {
|
|
sh 'python3 ./skrypt_download.py'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|