community / community.general / 8.5.0 / module / jenkins_build_info Get information about Jenkins builds | "added in version" 7.4.0 of community.general" Authors: Juan Casanova (@juanmcasanova)community.general.jenkins_build_info (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
Get information about Jenkins builds with Jenkins REST API.
- name: Get information about a jenkins build using basic authentication community.general.jenkins_build_info: name: "test-check" build_number: 1 user: admin password: asdfg url: http://localhost:8080
- name: Get information about a jenkins build anonymously community.general.jenkins_build_info: name: "stop-check" build_number: 3 url: http://localhost:8080
- name: Get information about a jenkins build using token authentication community.general.jenkins_build_info: name: "delete-experiment" build_number: 30 user: Jenkins token: abcdefghijklmnopqrstuvwxyz123456 url: http://localhost:8080
url: default: http://localhost:8080 description: - URL of the Jenkins server. type: str name: description: - Name of the Jenkins job to which the build belongs. required: true type: str user: description: - User to authenticate with the Jenkins server. type: str token: description: - API token used to authenticate with the Jenkins server. type: str password: description: - Password to authenticate with the Jenkins server. type: str build_number: description: - An integer which specifies a build of a job. - If not specified the last build information will be returned. type: int
build_info: description: Build info of the jenkins job. returned: success type: dict name: description: Name of the jenkins job. returned: success sample: test-job type: str state: description: State of the jenkins job. returned: success sample: present type: str url: description: URL to connect to the Jenkins server. returned: success sample: https://jenkins.mydomain.com type: str user: description: User used for authentication. returned: success sample: admin type: str