2022-04-03 21:30:07 +02:00
|
|
|
// pipeline {
|
2022-04-03 20:38:22 +02:00
|
|
|
|
2022-04-03 21:30:07 +02:00
|
|
|
// agent {
|
|
|
|
// dockerfile {
|
|
|
|
// additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} -t s478841-create-dataset"
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// stages {
|
|
|
|
// stage('Simple data stats') {
|
|
|
|
// steps {
|
|
|
|
// sh 'chmod u+x ./scripts/data_stats.sh'
|
|
|
|
// sh """
|
|
|
|
// docker run
|
|
|
|
// """
|
|
|
|
// sh './scripts/data_stats.sh'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// post {
|
|
|
|
// always {
|
|
|
|
// archiveArtifacts artifacts: 'data/*',
|
|
|
|
// onlyIfSuccessful: true
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
node {
|
|
|
|
checkout scm
|
2022-04-03 11:34:18 +02:00
|
|
|
|
2022-04-03 21:35:05 +02:00
|
|
|
stage('Load Docker image & data') {
|
2022-04-03 21:50:37 +02:00
|
|
|
def dataImage = docker.build('s478841-image', "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} .")
|
2022-04-03 21:30:07 +02:00
|
|
|
|
2022-04-03 22:00:46 +02:00
|
|
|
dataImage.inside('--name kaggload -v $WORKSPACE:/data -u root') {
|
2022-04-03 21:35:05 +02:00
|
|
|
// sh 'chmod u+x ./scripts/data_stats.sh'
|
|
|
|
// sh './scripts/data_stats.sh'
|
|
|
|
sh 'echo Data loaded'
|
|
|
|
}
|
2022-04-03 21:55:34 +02:00
|
|
|
sh 'docker cp kaggload:/app/data/* data/'
|
2022-04-03 20:38:22 +02:00
|
|
|
}
|
2022-04-03 21:30:07 +02:00
|
|
|
|
|
|
|
stage('Archive arifacts') {
|
2022-04-03 21:42:01 +02:00
|
|
|
archiveArtifacts artifacts: '*data/avocado.data*', onlyIfSuccessful: true
|
2022-04-03 11:34:18 +02:00
|
|
|
}
|
|
|
|
}
|