ium_444421/Jenkinsfile

38 lines
1.1 KiB
Plaintext
Raw Normal View History

2022-03-21 10:59:30 +01:00
pipeline {
2022-03-26 18:45:23 +01:00
agent any
2022-03-26 15:22:41 +01:00
parameters {
string(
defaultValue: '',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
2022-03-26 15:27:42 +01:00
)
2022-03-26 15:22:41 +01:00
password(
defaultValue: '',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
2022-03-26 19:06:03 +01:00
string(
defaultValue: '5',
description: 'Cutoff',
name: 'CUTOFF'
)
2022-03-26 15:22:41 +01:00
}
2022-03-21 10:59:30 +01:00
stages {
2022-03-26 15:22:41 +01:00
stage('Check out from version control') {
steps {
2022-03-26 15:44:18 +01:00
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444421', url: 'https://git.wmi.amu.edu.pl/s444421/ium_444421.git']]])
2022-03-26 15:22:41 +01:00
}
}
stage('Shell Script') {
2022-03-21 10:59:30 +01:00
steps {
2022-03-26 15:22:41 +01:00
sh 'chmod u+x ./download_data.sh'
2022-03-26 19:06:03 +01:00
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}","KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) {
2022-03-26 18:45:23 +01:00
sh './download_data.sh'
}
archiveArtifacts 'travel_insurance_data.txt'
2022-03-21 10:59:30 +01:00
}
}
}
}