I did something similar by defining a 'done' variable for each parallel
project, initialized to false, and set to true when the project is
complete. Then in the downstream steps I used the waitUntil step to
block the downstream step from starting until the 'done' variable was
true for the corresponding upstream project. Not the most elegant but it
did give the desired flow of execution.
|
#!groovy
import hudson.model.*
done_win = false
done_lin = false
stage('Testing') {
parallel (
['windows_remote': {
build job: 'remote_trigger_30', parameters: [string(name:
'branch_name', value: branch_name)]
done_win = true},
'linux_remote': {
build job: 'remote_trigger_60', parameters: [string(name:
'branch_name', value: branch_name)]
done_lin = true}
]
)
waitUntil {
done_win && done_lin
}
}
|
On 3/15/2017 10:28 AM, Chris Overend wrote:
|
#!groovy
import hudson.model.*
stage('Testing') {
parallel (
['windows_remote': {build job: 'remote_trigger_30',
parameters: [string(name: 'branch_name', value: branch_name)]},
'linux_remote': {build job: 'remote_trigger_60', parameters:
[string(name: 'branch_name', value: branch_name)]}
]
)
}
|
If I set "Block until the remote triggered projects finish their
builds." True
'remote_trigger_30' - blocks until complete
'remote_trigger_60' - blocks until complete
This is not parallel.
If I set "Block until the remote triggered projects finish their
builds." False
'remote_trigger_30' - starts remote build then returns complete
'remote_trigger_60' - starts remote build then returns complete
Both remote builds are still running but Pipeline returns complete
Is there a way to not block but wait?
--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to jenkinsci-users+unsubscr...@googlegroups.com
<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/d029d9be-d81e-4b4c-9210-396a4add6d46%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/d029d9be-d81e-4b4c-9210-396a4add6d46%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
*Eric Pyle
*
Siemens PLM Software
Lebanon, NH
+1 603-277-3060 (T)
+1 603-359-8670 (M)
eric.p...@siemens.com <mailto:eric.p...@cd-adapco.com>
http://www.siemens.com/plm <http://www.cd-adapco.com>
--
You received this message because you are subscribed to the Google Groups "Jenkins
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/c9e5aaeb-412f-5ba2-93ca-e667585e526b%40cd-adapco.com.
For more options, visit https://groups.google.com/d/optout.