Update 'Jenkinsfile'
This commit is contained in:
parent
d5035e6a27
commit
4ab9baa0c5
28
Jenkinsfile
vendored
28
Jenkinsfile
vendored
@ -1,11 +1,25 @@
|
|||||||
pipeline {
|
node {
|
||||||
agent any
|
stage('Preparation') {
|
||||||
|
properties([
|
||||||
stages {
|
parameters([
|
||||||
|
string(
|
||||||
|
defaultValue: 'Hello World!',
|
||||||
|
description: 'Tekst do wyświetlenie',
|
||||||
|
name: 'INPUT_TEXT',
|
||||||
|
trim: false
|
||||||
|
)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
}
|
||||||
stage('Hello') {
|
stage('Hello') {
|
||||||
steps {
|
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
||||||
echo 'Hello World'
|
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'
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user