When Jenkins is in quiet/prepare for shudown mode, new builds will cause an agent to be instantiated. The retention strategy code will remove the agent within 2-3 minutes. Added a check to see if Jenkins is in quiet mode and if it is, don't check again until the next audit (1 minute in the code).
To test.
Put Jenkins in "shutdown" mode
Schedule a build which uses an agent
Without the fix, the agent eventually gets removed. When you cancel shutdown, the build will be stuck waiting for an agent indefinitely
With the fix, there will be an agent spawned to run the build and it will start as soon as the shutdown is cancelled
[x] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
[x] Ensure that the pull request title represents the desired changelog entry
[x] Please describe what you did
[x] Link to relevant issues in GitHub or Jira
[x] Link to relevant pull requests, esp. upstream and downstream changes
[x] Ensure you have provided tests - that demonstrates feature works or fixes the issue (Not in code, but description
Issue: https://github.com/jenkinsci/docker-swarm-plugin/issues/113
When Jenkins is in quiet/prepare for shudown mode, new builds will cause an agent to be instantiated. The retention strategy code will remove the agent within 2-3 minutes. Added a check to see if Jenkins is in quiet mode and if it is, don't check again until the next audit (1 minute in the code).
To test.
Put Jenkins in "shutdown" mode
Schedule a build which uses an agent
Without the fix, the agent eventually gets removed. When you cancel shutdown, the build will be stuck waiting for an agent indefinitely
With the fix, there will be an agent spawned to run the build and it will start as soon as the shutdown is cancelled
[x] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
[x] Ensure that the pull request title represents the desired changelog entry
[x] Please describe what you did
[x] Link to relevant issues in GitHub or Jira
[x] Link to relevant pull requests, esp. upstream and downstream changes
[x] Ensure you have provided tests - that demonstrates feature works or fixes the issue (Not in code, but description