2021-03-23 20:31:17 +01:00
|
|
|
pipeline {
|
2021-04-11 14:13:55 +02:00
|
|
|
agent any
|
2021-03-23 20:31:17 +01:00
|
|
|
|
2021-03-28 15:07:45 +02:00
|
|
|
parameters {
|
2021-03-28 14:48:28 +02:00
|
|
|
string(
|
|
|
|
defaultValue: 'yerbamate',
|
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
2021-03-28 15:17:56 +02:00
|
|
|
)
|
2021-03-28 15:51:48 +02:00
|
|
|
string(
|
2021-03-28 16:06:45 +02:00
|
|
|
defaultValue: '10000',
|
2021-03-28 15:51:48 +02:00
|
|
|
description: 'Data cutoff',
|
|
|
|
name: 'CUTOFF',
|
|
|
|
trim: false
|
|
|
|
)
|
2021-03-28 14:48:28 +02:00
|
|
|
}
|
|
|
|
|
2021-03-23 20:31:17 +01:00
|
|
|
stages {
|
2021-03-28 13:06:52 +02:00
|
|
|
stage('checkout: Check out from version control') {
|
2021-03-23 20:31:17 +01:00
|
|
|
steps {
|
2021-03-28 13:06:52 +02:00
|
|
|
git credentialsId: 'f746c8e0-e974-4758-838d-1920a7b0e3dc',
|
|
|
|
url: 'https://git.wmi.amu.edu.pl/s434742/ium_434742'
|
2021-03-23 20:31:17 +01:00
|
|
|
}
|
|
|
|
}
|
2021-04-11 13:59:46 +02:00
|
|
|
// stage('sh: Shell Script') {
|
|
|
|
// steps {
|
|
|
|
// withEnv(['KAGGLE_USERNAME=$params.KAGGLE_USERNAME',
|
|
|
|
// 'KAGGLE_KEY=$params.KAGGLE_KEY']) {
|
|
|
|
// sh 'chmod +x avocado-preprocessing.sh'
|
|
|
|
// sh 'chmod +x ./avocado-preprocessing.sh'
|
|
|
|
// sh 'echo ${CUTOFF}'
|
|
|
|
// sh './avocado-preprocessing.sh ${CUTOFF}'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
stage('docker') {
|
|
|
|
steps {
|
|
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
|
|
|
script {
|
|
|
|
def img = docker.build('patlaz/ium:1.0')
|
|
|
|
img.inside {
|
|
|
|
sh 'chmod +x avocado-preprocessing.sh'
|
|
|
|
sh 'chmod +x ./avocado-preprocessing.sh'
|
|
|
|
sh 'echo ${CUTOFF}'
|
|
|
|
sh './avocado-preprocessing.sh ${CUTOFF}'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-28 13:06:52 +02:00
|
|
|
stage('archiveArtifacts') {
|
|
|
|
steps {
|
|
|
|
archiveArtifacts 'test.csv'
|
|
|
|
archiveArtifacts 'dev.csv'
|
|
|
|
archiveArtifacts 'train.csv'
|
|
|
|
}
|
|
|
|
}
|
2021-03-23 20:31:17 +01:00
|
|
|
}
|
2021-03-28 13:06:52 +02:00
|
|
|
}
|