Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/2.107.3-1' into release/2.107.3-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Richter committed Aug 28, 2018
2 parents 8c4b1c7 + 57fc9c9 commit a27d132
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
exclude_paths:
- ./tests/requirements
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
language: python
cache: pip
python: "2.7"

# Use the new container infrastructure
sudo: false

# Install pip
addons:
apt:
packages:
- python-pip

install:
# Install ansible and dependencies
- pip install ansible ansible-lint

# Check ansible version
- ansible --version

# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=./tests/requirements/:../' > ansible.cfg

script:
# Install requirements
- ansible-galaxy install -r tests/requirements.yml -p ./tests/requirements

# Run ansible-lint
- ansible-lint .

# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# wcm-io-devops.jenkins-pipeline-library
# wcm_io_devops.jenkins_pipeline_library

This role is a utility roles to setup jenkins instances for the usage of
the wcm-io-devops
Expand All @@ -14,13 +14,13 @@ Optionally the role also directly setups a Jenkins instance using [geerlingguy.j

The Version number will follow the following versioning schema:

`v[JenkinsVersion]-[ReleaseCount]`
`[JenkinsVersion]-[ReleaseCount]`

So for example:
* `v2.107.2-1` - first release for Jenkins 2.107.2
* `v2.107.2-2` - second release for Jenkins 2.107.2
* `v2.107.2-N` - nth release for Jenkins 2.107.2
* `v2.107.3-1` - first release for Jenkins 2.107.3
* `2.107.2-1` - first release for Jenkins 2.107.2
* `2.107.2-2` - second release for Jenkins 2.107.2
* `2.107.2-N` - nth release for Jenkins 2.107.2
* `2.107.3-1` - first release for Jenkins 2.107.3

## Requirements

Expand Down Expand Up @@ -110,12 +110,12 @@ Plugins that must be absent for jenkins-pipeline-library.
## Dependencies

This role depends on the
[wcm-io-devops.jenkins-plugins](https://github.com/wcm-io-devops/ansible-jenkins-plugins)
[wcm_io_devops.jenkins_plugins](https://github.com/wcm-io-devops/ansible-jenkins-plugins)
role to install/uninstall the plugins needed by the
[jenkins-pipeline-library](https://github.com/wcm-io-devops/jenkins-pipeline-library)

As transitive dependency this role uses the
[wcm-io-devops.jenkins-facts](https://github.com/wcm-io-devops/ansible-jenkins-facts)
[wcm_io_devops.jenkins_facts](https://github.com/wcm-io-devops/ansible-jenkins-facts)
role to retrieve the list of installed plugins from the Jenkins
instance.

Expand All @@ -126,7 +126,7 @@ https://github.com/wcm-io-devops/jenkins-pipeline-library.

- hosts: jenkins
roles:
- role: wcm-io-devops.jenkins-pipeline-library
- role: wcm_io_devops.jenkins_pipeline_library

## License

Expand Down
15 changes: 7 additions & 8 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
galaxy_info:
role_name: jenkins_pipeline_library
author: Tobias Richter
description: Ansible role for setting up a Jenkins instance for the jenkins-pipeline-library.
company: pro!vision
Expand All @@ -13,15 +14,13 @@ galaxy_info:

galaxy_tags:
- jenkins
- jenkins-pipeline-library
- jenkine-pipeline
- jenkins-shared-library
- pipeline
- wcmio

dependencies:
# install jenkins
- { role: geerlingguy.jenkins,
version: 3.5.0,
jenkins_admin_username: "{{ jenkins_pipeline_library_admin_username }}",
jenkins_admin_password: "{{ jenkins_pipeline_library_admin_password }}",
jenkins_http_port: "{{ jenkins_pipeline_library_jenkins_port }}",
Expand All @@ -31,12 +30,12 @@ dependencies:
jenkins_pkg_url: "{{ jenkins_pipeline_library_jenkins_pkg_url }}",
jenkins_process_user: "{{ jenkins_pipeline_library_jenkins_process_user }}",
jenkins_process_group: "{{ jenkins_pipeline_library_jenkins_process_group }}",
tags: ['wcm-io-devops.jenkins-pipeline-library.jenkins-installation'],
tags: ['wcm_io_devops.jenkins_pipeline_library.jenkins-installation'],
# only setup jenkins when enabled
when: jenkins_pipeline_library_jenkins_install == true
}
# install plugins
- { role: wcm-io-devops.jenkins-plugins,
} # install plugins
- { role: wcm_io_devops.jenkins_plugins,
version: 1.0.0,
jenkins_plugins_admin_username: "{{ jenkins_pipeline_library_admin_username }}",
jenkins_plugins_admin_password: "{{ jenkins_pipeline_library_admin_password }}",
jenkins_plugins_jenkins_home: "{{ jenkins_pipeline_library_jenkins_home }}",
Expand All @@ -45,4 +44,4 @@ dependencies:
jenkins_plugins_jenkins_url_prefix: "{{ jenkins_pipeline_library_jenkins_url_prefix }}",
jenkins_plugins_present: "{{ jenkins_pipeline_library_plugins_present }}",
jenkins_plugins_absent: "{{ jenkins_pipeline_library_plugins_absent }}",
}
}
3 changes: 3 additions & 0 deletions tests/inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[test]
localhost

8 changes: 8 additions & 0 deletions tests/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- name: wcm_io_devops.jenkins_facts
version: master
- name: wcm_io_devops.jenkins_service
version: master
- name: wcm_io_devops.jenkins_plugins
version: master
- name: geerlingguy.jenkins
version: 3.5.0
4 changes: 4 additions & 0 deletions tests/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: test role syntax
hosts: test
roles:
- ansible-jenkins-pipeline-library

0 comments on commit a27d132

Please sign in to comment.