Status: Resolved (View Workflow)
If I check "Restrict where the polling can be run" and add a label, I see this error in the polling log:
Polling started on Mar 4, 2016 8:26:00 PM
Polling for the job bundle-builder-develop-android
Looking nodes where the poll can be run.
Looking for a node to the restricted label android-dev.
Can't find any eligible slave nodes.
Trying to poll on master node.
And the script is executed on the master.
I believe this is because the plugin relies on a particular version of xtrigger but hasn't been built against this fixed version. The fix was applied here https://github.com/jenkinsci/xtrigger-lib/commit/b9434ceb27c4b1facd8302015d8edc7eb91ab216. I got passed the issue by deleting the jobs history and restarting Jenkins but this has been a bug for awhile. I arrived at this problem by switching the node in which the trigger runs which may not be the same use case as the bug creator.
Code changed in jenkins
JENKINS-33328 - Cannot run trigger script on a slave node
When I use version 0.34 of the scripttrigger plugin my shell trigger is executed on a windows slave configured "Only build jobs with label restrictions matching this node". My job is configured without "Restrict where this project can be run".
Polling output with version 0.34
Polling started on Apr 1, 2016 10:35:00 PM Polling for the job my-job Looking nodes where the poll can be run. Looking for a candidate node to run the poll. Polling remotely on win7-slave ...
Downgrade to version 0.32 and it runs on master again:
Polling started on Apr 1, 2016 10:47:00 PM Polling for the job my-job Looking nodes where the poll can be run. Looking for a candidate node to run the poll. Looking for a node with no predefined label. Trying to poll with the last built on node. Polling on master. ...
The Jenkins version is 1.642.2
Were there any nodes with the label android-dev online at the time the polling ran?