diff --git a/Jenkinsfile b/Jenkinsfile index 468522c..df17b58 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,13 +28,19 @@ pipeline { checkout scm } } - stage('Download dataset') { + stage('Prepare dataset') { + agent { + dockerfile { + filename 'Dockerfile' + reuseNode true + } + } + steps { - withEnv(["USERNAME=${params.USERNAME}", "API_KEY=${params.API_KEY}", "DATA_TRAIN_RATIO=${params.DATA_TRAIN_RATIO}", "CUTOFF=${params.CUTOFF}"]) { - sh "chmod +x download_dataset.sh" - sh "./download_dataset.sh $DATA_TRAIN_RATIO $CUTOFF" - archiveArtifacts artifacts: 'data.csv,train.csv,test.csv', onlyIfSuccessful: true - } + sh "chmod +x ./get_dataset.py" + sh "python3 ./get_dataset.py ${params.KAGGLE_USERNAME} ${params.KAGGLE_KEY}" + archiveArtifacts artifacts: 'dataset.csv,df_train.csv,df_test.csv', onlyIfSuccessful: true + } } } } diff --git a/stats/Jenkinsfile b/stats/Jenkinsfile index 6d2a160..4b6edff 100644 --- a/stats/Jenkinsfile +++ b/stats/Jenkinsfile @@ -1,5 +1,9 @@ pipeline { - agent any + agent { + docker { + image 'sheaza/ium_464980:latest' + } + } parameters { buildSelector ( defaultSelector: lastSuccessful(), @@ -20,8 +24,8 @@ pipeline { } stage('Get stats') { steps { - sh "chmod +x stats/get_stats.sh" - sh "./stats/get_stats.sh" + sh "chmod +x get_stats.py" + sh "python3 ./get_stats.py" archiveArtifacts artifacts: 'stats.txt', onlyIfSuccessful: true } }