From 2411a783ebcda91a85013feac3010157f419a017 Mon Sep 17 00:00:00 2001 From: Mateusz Piwowarski Date: Sun, 24 Mar 2024 10:41:05 +0100 Subject: [PATCH] Jenkins --- Jenkinsfile | 12 ++++++------ download_dataset.sh | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 download_dataset.sh diff --git a/Jenkinsfile b/Jenkinsfile index 97e9b7d..568f266 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,16 +16,16 @@ pipeline { stages { stage('Clone Repository') { steps { - // Clone the Git repository git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s464913/ium_464913' } } stage('Download dataset') { - withEnv(['KAGGLE_USERNAME=${params.KAGGLE_USERNAME}', 'KAGGLE_KEY=${params.KAGGLE_KEY}']) { - steps { - // Download dataset from kaggle - sh 'pip install kaggle' - sh 'kaggle datasets download -d mlg-ulb/creditcardfraud' + steps { + script { + withEnv (["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { + sh 'chmod +x download_dataset.sh' + sh './download_dataset.sh' + } } } } diff --git a/download_dataset.sh b/download_dataset.sh new file mode 100644 index 0000000..27ed624 --- /dev/null +++ b/download_dataset.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +pip install kaggle + +kaggle datasets download -d mlg-ulb/creditcardfraud + +unzip -o creditcardfraud.zip \ No newline at end of file