diff --git a/Jenkinsfile b/Jenkinsfile index 0a4a7df..527d637 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' diff --git a/download_data.sh b/download_data.sh index 396e702..bdf5b46 100644 --- a/download_data.sh +++ b/download_data.sh @@ -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 \ No newline at end of file +head -n $CUTOFF TravelInsurancePrediction.csv >> travel_insurance_data.txt \ No newline at end of file