Update Jenkinsfile

This commit is contained in:
Agata 2022-04-10 11:29:59 +02:00
parent 907626981b
commit e27ad69857

26
Jenkinsfile vendored
View File

@ -1,22 +1,8 @@
pipeline { pipeline {
agent any agent {
dockerfile true
}
parameters { parameters {
string(
defaultValue: '',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password(
defaultValue: '',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
string(
defaultValue: '5',
description: 'Cutoff',
name: 'CUTOFF'
)
} }
stages { stages {
stage('Check out from version control') { stage('Check out from version control') {
@ -26,11 +12,7 @@ pipeline {
} }
stage('Shell Script') { stage('Shell Script') {
steps { steps {
sh 'chmod u+x ./download_data.sh' sh 'python3 ./preparation.py'
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}","KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) {
sh './download_data.sh'
}
archiveArtifacts 'travel_insurance_data.txt'
} }
} }
} }