47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
// pipeline {
|
|
|
|
// 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
|
|
|
|
stage('Load Docker image & data') {
|
|
def dataImage = docker.build('s478841-image', "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} .")
|
|
|
|
dataImage.inside('--name kaggload -v $WORKSPACE:/data -u root') {
|
|
// sh 'chmod u+x ./scripts/data_stats.sh'
|
|
// sh './scripts/data_stats.sh'
|
|
sh 'echo Data loaded'
|
|
}
|
|
sh 'docker cp kaggload:/app/data/* data/'
|
|
}
|
|
|
|
stage('Archive arifacts') {
|
|
archiveArtifacts artifacts: '*data/avocado.data*', onlyIfSuccessful: true
|
|
}
|
|
}
|