community / community.general / 6.6.8 / module / jenkins_build Manage jenkins builds | "added in version" 2.2.0 of community.general" Authors: Brett Milford (@brettmilford), Tong He (@unnecessary-username)community.general.jenkins_build (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
Manage Jenkins builds with Jenkins REST API.
- name: Create a jenkins build using basic authentication community.general.jenkins_build: name: "test-check" args: cloud: "test" availability_zone: "test_az" state: present user: admin password: asdfg url: http://localhost:8080
- name: Stop a running jenkins build anonymously community.general.jenkins_build: name: "stop-check" build_number: 3 state: stopped url: http://localhost:8080
- name: Delete a jenkins build using token authentication community.general.jenkins_build: name: "delete-experiment" build_number: 30 state: absent user: Jenkins token: abcdefghijklmnopqrstuvwxyz123456 url: http://localhost:8080
url: default: http://localhost:8080 description: - URL of the Jenkins server. type: str args: description: - A list of parameters to pass to the build. type: dict name: description: - Name of the Jenkins job to build. required: true type: str user: description: - User to authenticate with the Jenkins server. type: str state: choices: - present - absent - stopped default: present description: - Attribute that specifies if the build is to be created, deleted or stopped. - The C(stopped) state has been added in community.general 3.3.0. 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. Is required to remove a build from the queue. 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