ium_s451499/ium_03/Jenkinsfile

43 lines
1.1 KiB
Groovy

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('checkout: Check out from version control') {
steps {
echo "ver control"
}
}
stage('sh: Shell Script') {
steps {
echo "shell"
}
}
stage('archiveArtifacts') {
steps {
echo "archive"
// archiveArtifacts 'output.txt'
}
}
stage('Koniec!') {
steps {
echo 'Dowidzenia'
}
}
}
}