If a label('something') is added to the job, everything works as expected.
Let me know if you need more information to reproduce it. The installation where I encountered this is otherwise pretty fresh
Expected Results
Jenkins runner spawns and job gets scheduled on it
Actual Results
No runner spawns and exceptions appear in the log:
java.lang.NullPointerException
at cloud.dnation.jenkins.plugins.hetzner.HetznerCloud.lambda$getTemplates$1(HetznerCloud.java:172)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at cloud.dnation.jenkins.plugins.hetzner.HetznerCloud.getTemplates(HetznerCloud.java:175)
at cloud.dnation.jenkins.plugins.hetzner.HetznerCloud.canProvision(HetznerCloud.java:163)
at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:702)
at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:325)
at hudson.slaves.NodeProvisioner.access$1000(NodeProvisioner.java:70)
at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:815)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:90)
at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Anything else?
Now that I know that the problem was that the job has no label it's not really an issue - but might save others some trouble if this gets fixed.
Jenkins and plugins versions report
Environment
```text Paste the output here ```What Operating System are you using (both controller, and any agents involved in the problem)?
Ubuntu 20.04.3 LTS x86_64 for both the jenkins master and for the cloud images.
Reproduction steps
I used the configuration-as-code plugin to define a seed job:
If a
label('something')
is added to the job, everything works as expected.Let me know if you need more information to reproduce it. The installation where I encountered this is otherwise pretty fresh
Expected Results
Jenkins runner spawns and job gets scheduled on it
Actual Results
No runner spawns and exceptions appear in the log:
Anything else?
Now that I know that the problem was that the job has no label it's not really an issue - but might save others some trouble if this gets fixed.