From e5db9fa7128b1918dc59dde7de8c1b0d708a8380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Wa=C5=82=C4=99sa?= Date: Sun, 27 Mar 2022 20:58:21 +0200 Subject: [PATCH] Zaktualizuj 'Jenkinsfile' --- Jenkinsfile | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ccdfd81..2fce5d1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,12 +1,36 @@ pipeline { - agent any + agent any + parameters { + string ( + defaultValue: 'sebastianwalesa', + description: 'Kaggle username', + name: 'KAGGLE_USERNAME', + trim: false + ) + password ( + defaultValue: 'c879e3806be4cd6ade7aa10ea81d4cfe', + description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/ kaggle-api#api-credentials', + name: 'KAGGLE_KEY' + ) + } stages { - stage('Stage 1') { + stage('First step') { steps { - checkout([$class: 'GitSCM', branches: [[name: '*/feature']], extensions: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s478839/ium_478839.git']]]) + echo 'Hello world!' + } + } + stage('Checkout') { + steps { + git 'https://git.wmi.amu.edu.pl/s478839/ium_478839.git' + } + } + stage('Shell Script') { + steps { + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { + sh "chmod +x -R ${env.WORKSPACE}" sh './skrypt.sh' - archiveArtifacts artifacts: 'understat.csv', 'understat_per_game.csv', followSymlinks: false - + } } } }