ium_434742/Jenkinsfile

66 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

2021-03-23 20:31:17 +01:00
pipeline {
2021-05-11 21:25:17 +02:00
agent any;
options {
copyArtifactPermission('s434742-training, s434742-evaluation');
}
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.py'
// sh 'chmod +x ./avocado-preprocessing.sh'
2021-04-11 13:59:46 +02:00
sh 'echo ${CUTOFF}'
sh 'python3 avocado-preprocessing.py ${CUTOFF}'
2021-04-11 13:59:46 +02:00
}
}
}
}
}
2021-03-28 13:06:52 +02:00
stage('archiveArtifacts') {
steps {
archiveArtifacts 'avocado_test.csv'
archiveArtifacts 'avocado_validate.csv'
archiveArtifacts 'avocado_train.csv'
2021-03-28 13:06:52 +02:00
}
}
2021-03-23 20:31:17 +01:00
}
2021-03-28 13:06:52 +02:00
}