[PR #7204/afeeb89a backport][stable-7] Improvements to the jenkins_build module and new jenkins_build_info module #7234
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #7204 as merged into main (afeeb89).
SUMMARY
Note: This PR actually includes three separate changes, if you prefer to have them in separate PRs just ask!
Due to some special requirements on our part, we needed (and added) the following:
Tested with Jenkins 2.235.5 and 2.401.3.
ISSUE TYPE
COMPONENT NAME
jenkins_build and jenkins_build_info
ADDITIONAL INFORMATION
For a bit of context, we are dealing with an external Jenkins server that randomly fails. This means that due to how the jenkins_build module works we were getting random errors on our Ansible playbook (although the Jenkins build would actually continue).
With these changes we are able to craft a playbook that, even if the server returns an error sometimes, is able to retry and actually check if the build kept going.