Zaktualizuj 'Jenkinsfile'
This commit is contained in:
parent
ff5c3ce67a
commit
7278528c52
49
Jenkinsfile
vendored
49
Jenkinsfile
vendored
@ -1,25 +1,26 @@
|
||||
node {
|
||||
stage('Preparation') {
|
||||
properties([
|
||||
parameters([
|
||||
string(
|
||||
defaultValue: 'Hello World!',
|
||||
description: 'Tekst do wyświetlenie',
|
||||
name: 'INPUT_TEXT',
|
||||
trim: false
|
||||
)
|
||||
])
|
||||
])
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Clone repository') {
|
||||
steps {
|
||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']],
|
||||
doGenerateSubmoduleConfigurations: false,
|
||||
extensions: [], submoduleCfg: [],
|
||||
userRemoteConfigs: [[url: 'https://github.com/your-username/your-repo.git']]])
|
||||
}
|
||||
}
|
||||
|
||||
stage('Process data') {
|
||||
steps {
|
||||
sh './process_data.sh'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Archive artifacts') {
|
||||
steps {
|
||||
archiveArtifacts artifacts: 'results.txt', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Hello') {
|
||||
//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') {
|
||||
echo 'Goodbye!'
|
||||
//Zarchiwizuj wynik
|
||||
archiveArtifacts 'output.txt'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user