From d33d3d3e60b4f8836162d97029e2553411262cf6 Mon Sep 17 00:00:00 2001 From: szymonj98 Date: Wed, 23 Mar 2022 19:38:59 +0100 Subject: [PATCH] zadanie --- Jenkinsfile | 8 +++++++- dataset_download.sh | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9d63e05..56822cf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,10 +12,16 @@ pipeline { description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', name: 'KAGGLE_KEY' ) + cutoff( + defaultValue: '', + description: 'Value for head command' + name: CUTOFF + ) } environment { KAGGLE_USERNAME="$params.KAGGLE_USERNAME" KAGGLE_KEY="$params.KAGGLE_KEY" + CUTOFF="$params.CUTOFF" } stages { stage('Stage 1') { @@ -23,7 +29,7 @@ pipeline { echo 'Hello world!!!' checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s444386/ium_444386']]]) sh "chmod u+x ./dataset_download.sh" - sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} ./dataset_download.sh" + sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./dataset_download.sh" archiveArtifacts 'data.txt' } } diff --git a/dataset_download.sh b/dataset_download.sh index f1eca82..a1932c7 100644 --- a/dataset_download.sh +++ b/dataset_download.sh @@ -2,5 +2,5 @@ kaggle datasets download -d tamber/steam-video-games unzip -o steam-video-games.zip > data.txt -head -n 10000 steam-200k.csv >> data.txt +head -n $3 steam-200k.csv >> data.txt