[workflow-plugin] build job gets triggered on any node irrespective of seletion using node

21 views
Skip to first unread message

Rupali

unread,
Dec 9, 2014, 8:50:57 AM12/9/14
to jenkins...@googlegroups.com
Hi,

I used workflow to trigger other already existing jobs as below:

stage "BUILD"
node('master') {
build 'test-build'
}

Though I have selected node as 'master' for this step, the build job "test-build" gets triggered on some other slave node.
Is this expected behavior?

Regards,
Rupali

Jesse Glick

unread,
Jan 8, 2015, 12:52:09 PM1/8/15
to jenkins...@googlegroups.com
On Tuesday, December 9, 2014 8:50:57 AM UTC-5, Rupali wrote:
node('master') {
build 'test-build'
}

Though I have selected node as 'master' for this step, the build job "test-build" gets triggered on some other slave node.
Is this expected behavior?

Yes. The contextual node (if any) is ignored by the ‘build’ step. Whatever test-build specifies as its assigned label is where it will build.

(If you really need the workflow to decide where the downstream project should run, you could probably do this somehow with the node label parameter plugin. But I cannot think of any use case for that.)
Reply all
Reply to author
Forward
0 new messages