From 4b90617683f49e15df79027f5ce7523b60c31793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Miko=C5=82ajski?= Date: Mon, 17 Apr 2023 21:08:40 +0200 Subject: [PATCH] Update 'Jenkinsfile' --- Jenkinsfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 15d075b..cc731a5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,6 +12,12 @@ node { defaultValue: '', description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', name: 'KAGGLE_KEY' + ), + string( + defaultValue: '7999', + description: 'Cut off value', + name: 'CUT', + trim: false ) ]) ]) @@ -25,8 +31,7 @@ node { "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { sh 'kaggle datasets download -d mssmartypants/water-quality > output.txt' sh 'unzip -o water-quality.zip >> output.txt' - sh 'readarray -t lines < waterQuality1.csv' - sh 'shuf -e "${lines[@]}" | head -n 30 > temp.csv' + sh 'head -n ${params.CUT} waterQuality1.csv > temp.csv' sh 'mv temp.csv waterQuality1.csv' sh 'python3 create_dataset.py >> output.txt' archiveArtifacts artifacts: 'waterQuality.csv, output.txt'