38 lines
1.1 KiB
Groovy
38 lines
1.1 KiB
Groovy
pipeline {
|
|
agent any
|
|
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 {
|
|
stage('Check out from version control') {
|
|
steps {
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444421', url: 'https://git.wmi.amu.edu.pl/s444421/ium_444421.git']]])
|
|
}
|
|
}
|
|
stage('Shell Script') {
|
|
steps {
|
|
sh 'chmod u+x ./download_data.sh'
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}","KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) {
|
|
sh './download_data.sh'
|
|
}
|
|
archiveArtifacts 'travel_insurance_data.txt'
|
|
}
|
|
}
|
|
}
|
|
}
|