Add a slave container configuration timeout
This should fix the following issue. When a JobDSL seed job is executed while a container is waiting for its configuration YAD plugin may loose track of the container. The container is left behind indefinitely waiting for its configuration.
We are using the JobDSL plugin to generate multiple cloud sections in $JENKINS_HOME/config.xml but the problem arise even when their is no change in the clouds configuration. I imagine that when the seed job is executed it somehow reload the plugins and the container provisioning task is dropped in midflight. The "Set exclusive execution" is set in our seed job but that doesn't prevent YAD from provisioning a container while a seed job is running (the provisioning task is not part of any job).
With this change, the container eventually exit in error and the jenkins master is able to provision another container.
Environment: Jenkins ver. 2.150.1 Job DSL plugin 1.70 Yet Another Docker Plugin 0.1.0-rc51
Codecov Report
Merging #252 into master will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## master #252 +/- ##
=========================================
Coverage 19.49% 19.49%
Complexity 247 247
=========================================
Files 73 73
Lines 3027 3027
Branches 286 286
=========================================
Hits 590 590
Misses 2376 2376
Partials 61 61
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 40b12e3...df96877. Read the comment docs.
Should the same be added in windows script?
Yes, I think so! Sorry, I've just realized that Windows containers are a thing. I've just submitted a new patch set for Windows. I don't have access to a Windows machine so I've quickly checked the syntax with a PowerShell port on linux.
imho let's better add this value into UI settings