Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Karaoke parallel #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 17 additions & 26 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
node() {
// adds job parameters within jenkinsfile
properties([
parameters([
booleanParam(
defaultValue: false,
description: 'isFoo should be false',
name: 'isFoo'
),
booleanParam(
defaultValue: true,
description: 'isBar should be true',
name: 'isBar'
),
])
])
node {
stage "hey"
sh 'echo `date` Stage 1;sleep 1; echo a1; sleep 1;echo a2;sleep 1; echo a3;sleep 4'

// test the false value
print 'DEBUG: parameter isFoo = ' + params.isFoo
print "DEBUG: parameter isFoo = ${params.isFoo}"
sh "echo sh isFoo is ${params.isFoo}"
if (params.isFoo) { print "THIS SHOULD NOT DISPLAY" }
stage "parallel"

// test the true value
print 'DEBUG: parameter isBar = ' + params.isBar
print "DEBUG: parameter isBar = ${params.isBar}"
sh "echo sh isBar is ${params.isBar}"
if (params.isBar) { print "this should display" }
parallel firstBranch: {
sh 'echo `date` Stage 2 - firstBranch www.spiegel.de'
sh 'ping -c 4 -i 3 www.spiegel.de || true'
sh 'echo `date` Stage 2 mirror out;sleep 1; echo a1; sleep 1;echo a2;sleep 1; echo a3;sleep 4'

}, secondBranch: {
sh 'echo `date` Stage 2 - secondBranch www.stern.de'
sh 'ping -c 6 -i 2 www.stern.de || true'
sh 'echo `date` Stage 2 star out;sleep 1; echo a1; sleep 1;echo a2;sleep 1; echo a3;sleep 1'
}

stage "ho"
sh 'echo done;sleep 1; echo a1; sleep 1;echo a2;sleep 1; echo a3;sleep 4'
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sss