-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to the jenkins_build module and new jenkins_build_info module #7204
Improvements to the jenkins_build module and new jenkins_build_info module #7204
Conversation
The test
|
Doesn't really make sense to test that with a mock
I don't really know why |
You added yourself to the authors list, but not to the maintainers list: the maintainer list for jenkins_build is here: https://github.com/ansible-collections/community.general/blob/main/.github/BOTMETA.yml#L672. You need to add new entries for the new modules there as well (also see https://github.com/ansible-collections/community.general/blob/main/CONTRIBUTING.md#creating-new-modules-or-plugins). |
Done, sorry I missed that @felixfontein. Let me know if you need something else from me to merge this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. If nobody objects, I'll merge this at the beginning of next week.
Backport to stable-7: 💚 backport PR created✅ Backport PR branch: Backported as #7234 🤖 @patchback |
…odule (#7204) * Add detach option so the task doesn't wait until the Jenkins job is finished * Add new time_between_checks to be able to configure the sleep time between requests * New jenkins_build_info to get information about a specific build * Add version_added to the new module * Add changelog fragment for jenkins_build changes * Fix tests that required the python-jenkins module * Remove tests that failed Doesn't really make sense to test that with a mock * Fix pep8 error * Update maintainers for the jenkins_build and jenkins_build_info modules * Improve format and add link to PR * Move version_added documentation to the right file * Fix incorrect examples * Improve text format * Fix incorrect code style * Fix incorrect YAML for documentation * Add version_added documentation to the new options (cherry picked from commit afeeb89)
@juanmcasanova thanks for your contribution! |
…ild module and new jenkins_build_info module (#7234) Improvements to the jenkins_build module and new jenkins_build_info module (#7204) * Add detach option so the task doesn't wait until the Jenkins job is finished * Add new time_between_checks to be able to configure the sleep time between requests * New jenkins_build_info to get information about a specific build * Add version_added to the new module * Add changelog fragment for jenkins_build changes * Fix tests that required the python-jenkins module * Remove tests that failed Doesn't really make sense to test that with a mock * Fix pep8 error * Update maintainers for the jenkins_build and jenkins_build_info modules * Improve format and add link to PR * Move version_added documentation to the right file * Fix incorrect examples * Improve text format * Fix incorrect code style * Fix incorrect YAML for documentation * Add version_added documentation to the new options (cherry picked from commit afeeb89) Co-authored-by: Juan Manuel Casanova González <[email protected]>
…odule (ansible-collections#7204) * Add detach option so the task doesn't wait until the Jenkins job is finished * Add new time_between_checks to be able to configure the sleep time between requests * New jenkins_build_info to get information about a specific build * Add version_added to the new module * Add changelog fragment for jenkins_build changes * Fix tests that required the python-jenkins module * Remove tests that failed Doesn't really make sense to test that with a mock * Fix pep8 error * Update maintainers for the jenkins_build and jenkins_build_info modules * Improve format and add link to PR * Move version_added documentation to the right file * Fix incorrect examples * Improve text format * Fix incorrect code style * Fix incorrect YAML for documentation * Add version_added documentation to the new options
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.