From 3bfd589d15771d8bac66c98b28c04f6cf9ff5ec2 Mon Sep 17 00:00:00 2001 From: s444501 Date: Sun, 27 Mar 2022 17:36:35 +0200 Subject: [PATCH] test --- Jenkinsfile | 59 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2f17913..0b3c3a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,25 +1,38 @@ -node { - stage('Preparation') { - properties([ - parameters([ - string( - defaultValue: 'Hello Worldyy!', - description: 'Tekst do wyświetlenie', - name: 'INPUT_TEXT', - trim: false - ) - ]) - ]) - } - stage('Hello') { - //Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!) - echo "INPUT_TEXT: ${INPUT_TEXT}" - //Wywołaj w konsoli komendę "figlet", która generuje ASCI-art - sh "figlet \"${INPUT_TEXT}\" | tee output.txt" - } - stage('Goodbye') { - echo 'Goodbye!' - //Zarchiwizuj wynik - archiveArtifacts 'output.txt' +pipeline { + agent any + parameters { + + string( + defaultValue: 'shuhrer', + description: 'Kaggle username', + name: 'KAGGLE_USERNAME', + trim: false + ) + password( + defaultValue: '', + description: 'Kaggle token', + name: 'KAGGLE_KEY' + ) + + } + + + + stages { + + stage('Check out from version control') { + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444501', url: 'https://git.wmi.amu.edu.pl/s444501/ium_444501.git']]]) + } + } + + stage('Shell Script') { + steps { + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}","KAGGLE_KEY=${params.KAGGLE_KEY}"]) { + sh './download.sh' + } + } + + } } }