Add cutoff parameter

This commit is contained in:
Agata 2022-03-26 19:06:03 +01:00
parent 4bd59f55ac
commit e447d211ab
2 changed files with 7 additions and 2 deletions

7
Jenkinsfile vendored
View File

@ -12,6 +12,11 @@ pipeline {
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') {
@ -22,7 +27,7 @@ pipeline {
stage('Shell Script') {
steps {
sh 'chmod u+x ./download_data.sh'
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}","KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}","KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) {
sh './download_data.sh'
}
archiveArtifacts 'travel_insurance_data.txt'

View File

@ -1,3 +1,3 @@
kaggle datasets download -d tejashvi14/travel-insurance-prediction-data
unzip -o travel-insurance-prediction-data.zip
head -n 15 TravelInsurancePrediction.csv >> travel_insurance_data.txt
head -n $CUTOFF TravelInsurancePrediction.csv >> travel_insurance_data.txt