ium_470618/Jenkinsfile

47 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-04-08 23:10:02 +02:00
node {
2023-05-10 15:31:09 +02:00
checkout scm
2023-05-24 14:22:37 +02:00
def dockerimage = docker.build("dockerfile_titanic")
2023-05-10 15:31:09 +02:00
dockerimage.inside {
2023-04-08 23:10:02 +02:00
stage('Preparation') {
properties([
parameters([
string(
defaultValue: 'wiktorbombola',
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(
2023-05-10 16:56:56 +02:00
defaultValue: '900',
2023-04-08 23:10:02 +02:00
description: 'Number of head lines to be taken from test file',
name: 'CUTOFF',
trim: false)
])
])
}
stage('Build') {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}",
"CUTOFF=${params.CUTOFF}"]) {
2023-05-24 14:41:56 +02:00
sh "echo ${params.KAGGLE_KEY}"
2023-04-08 23:34:44 +02:00
sh "./script.sh ${CUTOFF}"
2023-04-08 23:10:02 +02:00
}
}
stage('artifacts') {
echo 'saving artifacts'
2023-05-10 16:46:55 +02:00
archiveArtifacts 'output.csv'
2023-04-08 23:10:02 +02:00
}
2023-05-10 16:48:04 +02:00
stage('Trigger Learning pipeline') {
2023-05-10 16:54:19 +02:00
build job: './s470618-training', wait:false
2023-05-10 16:48:04 +02:00
}
2023-04-08 23:10:02 +02:00
}
2023-04-08 23:34:44 +02:00
}
2023-04-08 23:10:02 +02:00