ium_434742/Jenkinsfile
2021-04-11 13:59:46 +02:00

64 lines
1.7 KiB
Groovy

pipeline {
agent {
dockerfile true
}
parameters {
string(
defaultValue: 'yerbamate',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
string(
defaultValue: '10000',
description: 'Data cutoff',
name: 'CUTOFF',
trim: false
)
}
stages {
stage('checkout: Check out from version control') {
steps {
git credentialsId: 'f746c8e0-e974-4758-838d-1920a7b0e3dc',
url: 'https://git.wmi.amu.edu.pl/s434742/ium_434742'
}
}
// 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}'
}
}
}
}
}
stage('archiveArtifacts') {
steps {
archiveArtifacts 'test.csv'
archiveArtifacts 'dev.csv'
archiveArtifacts 'train.csv'
}
}
}
}