diff --git a/Jenkinsfile b/Jenkinsfile index 117eb23..0a4a7df 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,5 @@ pipeline { - agent any -/* + agent any parameters { string( defaultValue: '', @@ -14,7 +13,6 @@ pipeline { name: 'KAGGLE_KEY' ) } -*/ stages { stage('Check out from version control') { steps { @@ -24,8 +22,10 @@ pipeline { stage('Shell Script') { steps { sh 'chmod u+x ./download_data.sh' - sh './download_data.sh' - archiveArtifacts 'iris_data.txt' + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}","KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { + sh './download_data.sh' + } + archiveArtifacts 'travel_insurance_data.txt' } } } diff --git a/download_data.sh b/download_data.sh index cb5b264..396e702 100644 --- a/download_data.sh +++ b/download_data.sh @@ -1,2 +1,3 @@ -wget -c https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data -head -n 25 iris.data >> iris_data.txt \ No newline at end of file +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