ium_444356/Jenkinsfile

35 lines
1.0 KiB
Plaintext
Raw Normal View History

2022-03-25 18:50:22 +01:00
pipeline {
agent any
2022-03-25 19:04:23 +01:00
//Definiujemy parametry, które będzie można podać podczas wywoływania zadania
2022-03-25 18:50:22 +01:00
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'
}
}
2022-03-25 19:27:33 +01:00
stage('Checkout'){
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444356', url: 'https://git.wmi.amu.edu.pl/s444356/ium_444356.git']]])
}
}
2022-03-25 18:50:22 +01:00
}
}