pro_vision.jenkins_pv_pipeline_library
pro_vision.jenkins_pv_pipeline_library
This role helps set up Jenkins instances for using the pro!vision jenkins-pv-pipeline-library.
It installs all the necessary plugins in specific versions to ensure that the shared pipeline library always works with the latest compatible plugins.
Versioning
The version number follows this format:
[JenkinsVersion]-[ReleaseCount]
For example:
2.107.2-1
- first release for Jenkins version 2.107.22.107.2-2
- second release for Jenkins version 2.107.22.107.2-N
- nth release for Jenkins version 2.107.22.138.1-1
- first release for Jenkins version 2.138.1
Requirements
You need Ansible version 2.4 or higher and a running Jenkins on the target instance.
Role Variables
jenkins_pv_pipeline_library_jenkins_process_user: jenkins
- The Linux Jenkins user.
jenkins_pv_pipeline_library_jenkins_process_group: "{{ jenkins_pv_pipeline_library_jenkins_process_user }}"
- The Linux group for the Jenkins user.
jenkins_pv_pipeline_library_admin_username: admin
- Jenkins admin username.
jenkins_pv_pipeline_library_admin_password: admin
- Jenkins admin password.
jenkins_pv_pipeline_library_jenkins_home: /var/lib/jenkins
- Path to the Jenkins directory.
jenkins_pv_pipeline_library_jenkins_hostname: localhost
- Hostname of the Jenkins instance.
jenkins_pv_pipeline_library_jenkins_port: 8080
- HTTP port of the Jenkins instance.
jenkins_pv_pipeline_library_jenkins_url_prefix: ""
- URL prefix of the Jenkins instance (for example, when using Tomcat).
jenkins_pv_pipeline_library_jenkins_update_dir: "{{ jenkins_pv_pipeline_library_jenkins_home }}/updates"
- Path to the Jenkins update directory.
jenkins_pv_pipeline_library_jenkins_base_url: "http://{{ jenkins_facts_jenkins_hostname }}:{{ jenkins_facts_jenkins_port }}{{ jenkins_facts_jenkins_url_prefix }}"
- The base URL of the Jenkins instance.
jenkins_pv_pipeline_library_updates_expiration: 86400
- Maximum seconds since the last Jenkins plugin update check.
jenkins_pv_pipeline_library_updates_timeout: 60
- Timeout for Jenkins update operations.
jenkins_pv_pipeline_library_debug: false
- If enabled, this will log some debug information.
jenkins_pv_pipeline_library_plugins_present: [...]
- List of plugins and their versions that must be included for jenkins-pv-pipeline-library.
:bulb: This list can be long; please check the defaults.
jenkins_pv_pipeline_library_plugins_absent: []
- Plugins that must not be included for jenkins-pv-pipeline-library.
Dependencies
This role relies on the wcm_io_devops.jenkins_plugins role to install or uninstall the needed plugins for the jenkins-pipeline-library.
It also uses the wcm_io_devops.jenkins_facts role to get the list of installed plugins from the Jenkins instance.
Example Playbook
This playbook prepares the Jenkins instance for using the jenkins-pv-pipeline-library.
- hosts: jenkins
roles:
- role: pro_vision.jenkins_pv_pipeline_library
License
Apache 2.0
Ansible role for setting up a Jenkins instance for the pro!vision jenkins-pv-pipeline-library
ansible-galaxy install pro_vision.jenkins_pv_pipeline_library