ium_434732/Jenkinsfile

47 lines
1.5 KiB
Plaintext
Raw Normal View History

2021-03-28 19:39:27 +02:00
node {
2021-03-28 19:27:38 +02:00
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') {
2021-04-10 15:20:02 +02:00
2021-03-28 19:53:56 +02:00
2021-03-28 19:56:08 +02:00
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
2021-03-28 19:27:38 +02:00
"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']]])
2021-04-10 15:26:01 +02:00
checkout scm
2021-04-10 16:00:15 +02:00
2021-04-10 16:21:18 +02:00
def image = docker.build("image", "build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} KAGGLE_KEY=${params.KAGGLE_KEY}")
image.inside {
2021-04-10 15:20:02 +02:00
sh 'python3 ./skrypt_download.py'
2021-04-10 16:01:33 +02:00
2021-04-10 15:20:02 +02:00
}
2021-03-28 19:27:38 +02:00
2021-04-10 16:05:13 +02:00
2021-03-28 19:53:56 +02:00
2021-04-10 16:05:13 +02:00
}
2021-03-28 19:27:38 +02:00
}
2021-04-10 16:03:57 +02:00
}
2021-03-28 19:27:38 +02:00
}
2021-03-28 19:39:27 +02:00