diff --git a/jenkins/Jenkinsfile_docker b/jenkins/Jenkinsfile_docker deleted file mode 100644 index 6d43c77..0000000 --- a/jenkins/Jenkinsfile_docker +++ /dev/null @@ -1,46 +0,0 @@ -// 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 'cp /app/data/* /data/data' - sh 'echo Data loaded' - } - } - - stage('Archive arifacts') { - archiveArtifacts artifacts: '*data/avocado.data*', onlyIfSuccessful: true - } -} diff --git a/jenkins/docker.Jenkinsfile b/jenkins/docker.Jenkinsfile new file mode 100644 index 0000000..7d02f49 --- /dev/null +++ b/jenkins/docker.Jenkinsfile @@ -0,0 +1,18 @@ +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 'cp /app/data/* /data/data' + sh 'echo Data loaded' + } + } + + stage('Archive arifacts') { + archiveArtifacts artifacts: '*data/avocado.data*', onlyIfSuccessful: true + } +} diff --git a/jenkins/Jenkinstats_docker b/jenkins/dockerstats.Jenkinsfile similarity index 100% rename from jenkins/Jenkinstats_docker rename to jenkins/dockerstats.Jenkinsfile diff --git a/jenkins/Jenkinstats b/jenkins/stats.Jenkinsfile similarity index 100% rename from jenkins/Jenkinstats rename to jenkins/stats.Jenkinsfile