From 696f04ae7d88ecad58f2c9970aeb5a442cb6e1f1 Mon Sep 17 00:00:00 2001 From: s464903 Date: Sat, 30 Mar 2024 11:20:11 +0100 Subject: [PATCH] Update Jenkinsfile3 --- Jenkinsfile3 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Jenkinsfile3 b/Jenkinsfile3 index 9fae563..0ccb81f 100644 --- a/Jenkinsfile3 +++ b/Jenkinsfile3 @@ -34,6 +34,41 @@ pipeline { steps{ docker.image('test-image').inside { + stage('Build') { + steps { + // Run the maven build + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { + sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME' + sh 'kaggle datasets list' + } + } + } + stage('Checkout') { + steps { + // Krok: Sklonowanie repozytorium git + checkout scm + } + } + stage('Execute Shell Script') { + steps { + withEnv(["CUTOFF=${params.CUTOFF}" ]) { + // Krok: Wywołanie skryptu shella + script { + sh 'chmod +x data_processing_script.sh' // Nadaj uprawnienia do wykonania skryptu + sh './data_processing_script.sh $CUTOFF' // Wykonaj skrypt + } + } + } + } + stage('Archive Artifacts') { + steps { + // Krok: Zarchiwizowanie artefaktów + archiveArtifacts artifacts: 'processed_data.csv', fingerprint: true + } + } + + } } }