2024-03-20 14:35:23 +01:00
|
|
|
|
pipeline {
|
|
|
|
|
agent any
|
2024-03-20 14:40:21 +01:00
|
|
|
|
//Definijuemy parametry, kt<6B>re b<>dzie mo<6D>na poda<64> podczas wywo<77>ywania zadania
|
2024-03-20 14:35:23 +01:00
|
|
|
|
parameters {
|
|
|
|
|
string (
|
|
|
|
|
defaultValue: 'Hello World!',
|
2024-03-20 14:40:21 +01:00
|
|
|
|
description: 'Tekst, kt<6B>rym chcesz przywita<74> <20>wiat',
|
2024-03-20 14:35:23 +01:00
|
|
|
|
name: 'INPUT_TEXT',
|
|
|
|
|
trim: false
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
stages {
|
|
|
|
|
stage('Hello') {
|
|
|
|
|
steps {
|
2024-03-20 14:40:21 +01:00
|
|
|
|
//Wypisz warto<74><6F> parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
2024-03-20 14:44:05 +01:00
|
|
|
|
echo "INPUT_TEXT: promoscan"
|
2024-03-20 14:40:21 +01:00
|
|
|
|
//Wywo<77>aj w konsoli komend<6E> "figlet", kt<6B>ra generuje ASCI-art
|
2024-03-20 14:44:05 +01:00
|
|
|
|
sh "figlet \"promoscan\" | tee output.txt"
|
2024-03-20 14:35:23 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
stage('Goodbye!') {
|
|
|
|
|
steps {
|
|
|
|
|
echo 'Goodbye!'
|
|
|
|
|
//Zarchiwizuj wynik
|
|
|
|
|
archiveArtifacts 'output.txt'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|