ium_434742/Jenkinsfile
patrycjalazna 572736f2c2
Some checks failed
s434742-training/pipeline/head This commit looks good
s434742-evaluation/pipeline/head There was a failure building this commit
added permissions to copy artifacts
2021-05-11 21:25:17 +02:00

66 lines
1.8 KiB
Groovy

pipeline {
agent any;
options {
copyArtifactPermission('s434742-training, s434742-evaluation');
}
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.py'
// sh 'chmod +x ./avocado-preprocessing.sh'
sh 'echo ${CUTOFF}'
sh 'python3 avocado-preprocessing.py ${CUTOFF}'
}
}
}
}
}
stage('archiveArtifacts') {
steps {
archiveArtifacts 'avocado_test.csv'
archiveArtifacts 'avocado_validate.csv'
archiveArtifacts 'avocado_train.csv'
}
}
}
}