changed Jenkinsfile
This commit is contained in:
parent
4d73f67dd7
commit
9dc2f55ed7
48
Jenkinsfile
vendored
48
Jenkinsfile
vendored
@ -1,29 +1,23 @@
|
||||
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 ASCII-art
|
||||
sh "figlet \"${INPUT_TEXT}\" | tee output.txt"
|
||||
}
|
||||
}
|
||||
stage('Goodbye!') {
|
||||
steps {
|
||||
echo 'Goodbye!'
|
||||
//Zarchiwizuj wynik
|
||||
archiveArtifacts 'output.txt'
|
||||
}
|
||||
}
|
||||
}
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Clone repository') {
|
||||
steps {
|
||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']], userRemoteConfigs: [[url: 'https://github.com/your/repo.git']]])
|
||||
}
|
||||
}
|
||||
stage('Run shell script') {
|
||||
steps {
|
||||
script {
|
||||
sh './scripts/data_processing.sh'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
archiveArtifacts artifacts: 'results.txt', allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user