Compare commits

...

2 Commits

Author SHA1 Message Date
Karol Cyganik
cdf35f3e22 Merge branch 'main' of https://git.wmi.amu.edu.pl/s495715/iumKC 2024-03-20 12:47:26 +01:00
Karol Cyganik
60d27cd2d3 add helloworld jenkinsfile 2024-03-20 12:47:00 +01:00

29
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,29 @@
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'
}
}
}
}