From a158d62eca85b391258017e9df0835c86e385141 Mon Sep 17 00:00:00 2001 From: "sadurska@trui.pl" Date: Mon, 19 Apr 2021 14:40:18 +0200 Subject: [PATCH] tweak(UMA_03) Update Jenkinsfile --- Jenkinsfile | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index abff78e..0352999 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,23 +1,29 @@ -pipeline{ - agent any - properties([options([text(defaultValue: '50', description: 'Number of lines to cutoff', name: 'CUTOFF')])]) - stages{ - stage('checkout: Check out from version control'){ - steps{ - git url: 'https://git.wmi.amu.edu.pl/s434780/ium_434780' - } - } - stage('sh: Shell Script'){ - steps{ - ./script.sh - } - } - stage('Archive artifacts'){ - steps{ - archiveArtifacts 'test.csv' - archiveArtifacts 'dev.csv' - archiveArtifacts 'train.csv' - } - } - } +pipeline { + agent any + //Definijuemy parametry, które będzie można podać podczas wywoływania zadania + parameters { + string ( + defaultValue: 'Hello World!', + description: 'Tekst, którym chcesz przywitać świat', + name: 'INPUT_TEXT', + trim: false + ) + } + stages { + stage('Hello') { + steps { + //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!') { + steps { + echo 'Goodbye!' + //Zarchiwizuj wynik + archiveArtifacts 'output.txt' + } + } + } } \ No newline at end of file