Update Jenkinsfile

This commit is contained in:
s464962 2024-03-26 10:47:35 +01:00
parent b245f391e0
commit 51876ea181
1 changed files with 2 additions and 9 deletions

11
Jenkinsfile vendored
View File

@ -4,25 +4,18 @@ pipeline {
parameters {
string (
defaultValue: 'Hello World!',
description: 'Tekst, którym chcesz przywitać świat',
name: 'INPUT_TEXT',
trim: false
description: 'Tekst, którym chcesz przywitać świat'
)
}
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"
echo "Hello World"
}
}
stage('Goodbye!') {
steps {
echo 'Goodbye!'
//Zarchiwizuj wynik
archiveArtifacts 'output.txt'
}
}
}