diff --git a/Jenkinsfile b/Jenkinsfile index 58894aa..9711975 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,10 +29,13 @@ pipeline { ) } } - stage('Shell') { + stage('Download data') { steps { - sh 'chmod 777 ./data_processing.sh' - sh "./data_processing.sh ${params.CUTOFF}" + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { + sh 'chmod 777 ./data_processing.sh' + sh "./data_processing.sh ${params.CUTOFF}" + } } } stage('Artifacts') { @@ -40,14 +43,5 @@ pipeline { archiveArtifacts artifacts: 'processed_data.txt' } } - stage('Kaggle') { - steps { - withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", - "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { - sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME' - sh 'kaggle datasets list' - } - } - } } } \ No newline at end of file diff --git a/data_processing.sh b/data_processing.sh index ec5bced..48b0bb0 100644 --- a/data_processing.sh +++ b/data_processing.sh @@ -1,2 +1,3 @@ #!/bin/bash -head -n $1 example_data.txt > processed_data.txt \ No newline at end of file +kaggle datasets download muhammadbinimran/housing-price-prediction-data --unzip +head -n $1 housing_price_dataset.csv > processed_data.txt \ No newline at end of file diff --git a/example_data.txt b/example_data.txt deleted file mode 100644 index 6c2fe55..0000000 --- a/example_data.txt +++ /dev/null @@ -1,13 +0,0 @@ -test1 -test15 -test134 -test1453 -test134543 -test134 -test1rth -test1test1test1tre -test1rthrt -test1hrt -test1hrtsda - -