jenksinsfile1

This commit is contained in:
filnow 2024-03-26 17:59:55 +01:00
parent 7c86c92cbf
commit 134226e251
1 changed files with 8 additions and 27 deletions

35
Jenkinsfile vendored
View File

@ -1,29 +1,10 @@
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'
}
}
}
agent any
stages {
stage('Stage 1') {
steps {
echo 'Hello World'
}
}
}
}