-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.431
startup-trigger-plugin 2.9.4
I have 2 Jenkins instances where I want to trigger a job on startup of the master node. The log files of both instances indicate taht the HudsonComputerListener ist triggered an have
"Scanning jobs for node master"
in the log file.
One instance is Scheduling the expected job, the other is not. I tried to find a difference by executing a script via script console to check for all conditions that I found in the source code but to no avail.
Ist there anything other that influences the scheduling of jobs that I have missed?
The script
println Jenkins.instance.getLabel("master") Jenkins.instance.getAllItems(Job.class).each{ if (it instanceof ParameterizedJobMixIn.ParameterizedJob) { ParameterizedJobMixIn.ParameterizedJob<?, ?> pJob = (ParameterizedJobMixIn.ParameterizedJob<?, ?>) it; pJob.getTriggers().values().each{ if (it instanceof org.jvnet.hudson.plugins.triggers.startup.HudsonStartupTrigger) { println pJob.name + " - " + pJob.class + " - " + it.getRunOnChoice() + " - " + it.getLabel() + " - " + pJob.isBuildable() } } } }
results in
SeedJob - class hudson.model.FreeStyleProject - ON_CONNECT - master - true
on both instances.
[JENKINS-72329] HudsonComputerListener not scheduling jobs
Comment |
[ Are you aware that the "master" label has been renamed to "built-in"? In case the instance where jobs are not started was setup after the rename then the label "master" will not resolve to anything unless you explicitly set the label for the built-in node.
Check the help for the label expression of "Restrict where this project can be run", an empty value means it can run anywhere ] |