Jenkinsfile changed

This commit is contained in:
patrycjalazna 2021-04-11 13:59:46 +02:00
parent 5b02c0fe05
commit dfe790f8d5

39
Jenkinsfile vendored
View File

@ -25,17 +25,34 @@ pipeline {
url: 'https://git.wmi.amu.edu.pl/s434742/ium_434742' url: 'https://git.wmi.amu.edu.pl/s434742/ium_434742'
} }
} }
stage('sh: Shell Script') { // stage('sh: Shell Script') {
steps { // steps {
withEnv(['KAGGLE_USERNAME=$params.KAGGLE_USERNAME', // withEnv(['KAGGLE_USERNAME=$params.KAGGLE_USERNAME',
'KAGGLE_KEY=$params.KAGGLE_KEY']) { // 'KAGGLE_KEY=$params.KAGGLE_KEY']) {
sh 'chmod +x avocado-preprocessing.sh' // sh 'chmod +x avocado-preprocessing.sh'
sh 'chmod +x ./avocado-preprocessing.sh' // sh 'chmod +x ./avocado-preprocessing.sh'
sh 'echo ${CUTOFF}' // sh 'echo ${CUTOFF}'
sh './avocado-preprocessing.sh ${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') { stage('archiveArtifacts') {
steps { steps {
archiveArtifacts 'test.csv' archiveArtifacts 'test.csv'