25 lines
760 B
Groovy
25 lines
760 B
Groovy
node {
|
|
stage('Preparation') {
|
|
properties([
|
|
parameters([
|
|
string(
|
|
defaultValue: 'Hello World!',
|
|
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'
|
|
}
|
|
} |