Skip to content

Instantly share code, notes, and snippets.

@conf
Last active July 14, 2017 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save conf/2cf44ea7fba37649397bc88feac21373 to your computer and use it in GitHub Desktop.
Save conf/2cf44ea7fba37649397bc88feac21373 to your computer and use it in GitHub Desktop.
Declarative Pipeline Test
echo Hello, I am $0!
echo Hello, I am $0!
echo Hello, I am $0!
@Library('globalLibrary') _
pipeline {
agent any
options {
ansiColor('xterm')
timestamps()
timeout(time: 1, unit: 'HOURS')
}
environment {
MY_VAR = "1"
}
stages {
stage('Running a.sh') {
steps {
sh "./a.sh"
}
}
stage('Run jobs conf-b and conf-c in parallel') {
steps {
parallel(
"conf-b": { build job: 'conf-b', propagate: true },
"conf-c": { build job: 'conf-c', propagate: true }
)
}
}
}
}
@Library('globalLibrary') _
pipeline {
agent any
options {
ansiColor('xterm')
timestamps()
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('Running b.sh') {
steps {
sh "./b.sh"
}
}
}
}
@Library('globalLibrary') _
pipeline {
agent any
options {
ansiColor('xterm')
timestamps()
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('Running c.sh') {
steps {
sh "./c.sh"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment