diff --git a/Jenkinsfile b/Jenkinsfile index 2ca2f8e..b4ac240 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,11 @@ pipeline { description: 'Kaggle token', name: 'KAGGLE_KEY' ) - + string( + defaultValue: '2', + description: 'Cutoff lines', + name: 'CUTOFF' + ) } @@ -29,7 +33,7 @@ pipeline { stage('Shell Script') { steps { sh 'chmod u+x download.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 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME' sh './download.sh' } diff --git a/download.sh b/download.sh index 43aa522..9890c3a 100755 --- a/download.sh +++ b/download.sh @@ -2,4 +2,4 @@ kaggle datasets download -d arushchillar/disneyland-reviews unzip disneyland-reviews.zip head DisneylandReviews.csv > d_test.csv tail DisneylandReviews.csv > d_dev.csv -tail -n 20 DisneylandReviews.csv > d_train.csv +tail -n $CUTOFF DisneylandReviews.csv > d_train.csv