From 7a909839b46eab5621ba62ea243696e612d61579 Mon Sep 17 00:00:00 2001 From: Witold Woch Date: Tue, 28 Mar 2023 22:11:15 +0200 Subject: [PATCH] Zaktualizuj 'Jenkinsfile' --- Jenkinsfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 7cb92f4..46db0bc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,22 @@ +node { + stage('Preparation') { + properties([ + parameters([ + string( + defaultValue: 'witeks1833', + description: 'Kaggle username', + name: 'KAGGLE_USERNAME', + trim: false + ), + password( + defaultValue: '', + description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', + name: 'KAGGLE_KEY' + ) + ]) + ]) + } + pipeline { agent any stages { @@ -15,4 +34,15 @@ pipeline { } } } +} + +stage('Build') { + // Run the maven build + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { + sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME' + sh 'chmod u+x ./Downlaods_sales.sh' + sh './Downlaods_sales.sh' + } + } } \ No newline at end of file