Skip to content
This repository has been archived by the owner on Jul 5, 2020. It is now read-only.

Commit

Permalink
Merge pull request #36 from infOpen/devel
Browse files Browse the repository at this point in the history
Misc changes
  • Loading branch information
achaussier committed Mar 14, 2016
2 parents 68a08c4 + 978076a commit 7c9d503
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 83 deletions.
62 changes: 30 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,13 @@ Follow the possible variables with their default values

# Plugins: debian package builder
jenkins_plugins_debian_package_builder_remove_repositories: True
jenkins_plugins_debian_package_builder:
gpg:
name: 'Foo Bar'
email: '[email protected]'
public_key: 'foo_public_key'
private_key: 'foo_private_key'
passphrase: 'foo_passphrase'
repo: []
jenkins_plugins_debian_package_builder_gpg:
name: 'Foo Bar'
email: '[email protected]'
public_key: 'foo_public_key'
private_key: 'foo_private_key'
passphrase: 'foo_passphrase'
jenkins_plugins_debian_package_builder_repo: []

# Plugins : gitlab
jenkins_plugins_gitlab_api_token: ''
Expand Down Expand Up @@ -286,30 +285,29 @@ Example:
You can manage the plugin configuration with these settings, example with
repositories for publisher step:

jenkins_plugins_debian_package_builder:
gpg:
name: 'Foo Bar'
email: '[email protected]'
public_key: 'foo_public_key'
private_key: 'foo_private_key'
passphrase: 'foo_passphrase'
repo:
- name: 'repo_1'
method: 'scpb'
fqdn: 'foo.bar.fr'
incoming: '/foo'
login: 'foo'
key_path: '/bar/foo.key'
options: 'foo_options'
state: 'present'
- name: 'repo_2'
method: 'scpb'
fqdn: 'foobar.bar.fr'
incoming: '/foobar'
login: 'foobar'
key_path: '/bar/foobar.key'
options: 'foobar_options'
state: 'absent'
jenkins_plugins_debian_package_builder_gpg:
name: 'Foo Bar'
email: '[email protected]'
public_key: 'foo_public_key'
private_key: 'foo_private_key'
passphrase: 'foo_passphrase'
jenkins_plugins_debian_package_builder_repo:
- name: 'repo_1'
method: 'scpb'
fqdn: 'foo.bar.fr'
incoming: '/foo'
login: 'foo'
key_path: '/bar/foo.key'
options: 'foo_options'
state: 'present'
- name: 'repo_2'
method: 'scpb'
fqdn: 'foobar.bar.fr'
incoming: '/foobar'
login: 'foobar'
key_path: '/bar/foobar.key'
options: 'foobar_options'
state: 'absent'

You can remove all repositories before plugin configuration. Just set True to
"jenkins_plugins_debian_package_builder_remove_repositories" variable.
Expand Down
15 changes: 7 additions & 8 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,13 @@ jenkins_plugins_github_servers: []

# Plugins: debian package builder
jenkins_plugins_debian_package_builder_remove_repositories: True
jenkins_plugins_debian_package_builder:
gpg:
name: 'Foo Bar'
email: '[email protected]'
public_key: 'foo_public_key'
private_key: 'foo_private_key'
passphrase: 'foo_passphrase'
repo: []
jenkins_plugins_debian_package_builder_gpg:
name: 'Foo Bar'
email: '[email protected]'
public_key: 'foo_public_key'
private_key: 'foo_private_key'
passphrase: 'foo_passphrase'
jenkins_plugins_debian_package_builder_repo: []

# Plugins : gitlab
jenkins_plugins_gitlab_api_token: ''
Expand Down
12 changes: 6 additions & 6 deletions tasks/manage_plugins_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
become : True
become_user : "{{ jenkins_etc_user }}"
manage_jenkins_plugin_debian_package_builder_gpg:
name: "{{ jenkins_plugins_debian_package_builder.gpg.name }}"
email: "{{ jenkins_plugins_debian_package_builder.gpg.email }}"
public_key: "{{ jenkins_plugins_debian_package_builder.gpg.public_key }}"
private_key: "{{ jenkins_plugins_debian_package_builder.gpg.private_key }}"
passphrase: "{{ jenkins_plugins_debian_package_builder.gpg.passphrase }}"
name: "{{ jenkins_plugins_debian_package_builder_gpg.name }}"
email: "{{ jenkins_plugins_debian_package_builder_gpg.email }}"
public_key: "{{ jenkins_plugins_debian_package_builder_gpg.public_key }}"
private_key: "{{ jenkins_plugins_debian_package_builder_gpg.private_key }}"
passphrase: "{{ jenkins_plugins_debian_package_builder_gpg.passphrase }}"
register: jenkins_change_plugin_debian_package_builder_gpg
when: "{{ 'debian-package-builder' in
(jenkins_plugins | map(attribute='name')) }}"
Expand Down Expand Up @@ -86,7 +86,7 @@
options: "{{ item.options }}"
state: "{{ item.state }}"
register: jenkins_change_plugin_debian_package_builder_repo
with_items: "{{ jenkins_plugins_debian_package_builder.repo }}"
with_items: "{{ jenkins_plugins_debian_package_builder_repo }}"
when: "{{ 'debian-package-builder' in
(jenkins_plugins | map(attribute='name')) }}"

Expand Down
13 changes: 1 addition & 12 deletions tests/test_travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,11 @@
- hosts: localhost
remote_user: root
pre_tasks:
- include_vars: "./{{ ansible_os_family | lower }}.yml"
- include_vars: "./test_vars.yml"
roles:
- "{{ role_name }}"
post_tasks:
- include: ./common_tests.yml
vars:
jenkins_plugins:
- name: ansible
- name: ansicolor
- name: build-pipeline-plugin
- name: debian-package-builder
- name: envinject
- name: git
- name: github
- name: graphiteIntegrator
- name: publish-over-ssh
- name: ssh
role_name: "{{ lookup('env','TRAVIS_REPO_SLUG') }}"

2 changes: 1 addition & 1 deletion tests/test_vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- hosts: all
remote_user: vagrant
pre_tasks:
- include_vars: "./{{ ansible_os_family | lower }}.yml"
- include_vars: "./test_vars.yml"
roles:
- "{{ role_name }}"
post_tasks:
Expand Down
47 changes: 23 additions & 24 deletions tests/debian.yml → tests/test_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,30 +73,29 @@ jenkins_plugins_github_servers:

# Plugins : debian package builder
jenkins_plugins_debian_package_builder_remove_repositories: False
jenkins_plugins_debian_package_builder:
gpg:
name: 'Foo Bar'
email: '[email protected]'
public_key: 'foo_public_key'
private_key: 'foo_private_key'
passphrase: 'foo_passphrase'
repo:
- name: 'repo_1'
method: 'scpb'
fqdn: 'foo.bar.fr'
incoming: '/foo'
login: 'foo'
key_path: '/bar/foo.key'
options: 'foo_options'
state: 'present'
- name: 'repo_2'
method: 'scpb'
fqdn: 'foobar.bar.fr'
incoming: '/foobar'
login: 'foobar'
key_path: '/bar/foobar.key'
options: 'foobar_options'
state: 'absent'
jenkins_plugins_debian_package_builder_gpg:
name: 'Foo Bar'
email: '[email protected]'
public_key: 'foo_public_key'
private_key: 'foo_private_key'
passphrase: 'foo_passphrase'
jenkins_plugins_debian_package_builder_repo:
- name: 'repo_1'
method: 'scpb'
fqdn: 'foo.bar.fr'
incoming: '/foo'
login: 'foo'
key_path: '/bar/foo.key'
options: 'foo_options'
state: 'present'
- name: 'repo_2'
method: 'scpb'
fqdn: 'foobar.bar.fr'
incoming: '/foobar'
login: 'foobar'
key_path: '/bar/foobar.key'
options: 'foobar_options'
state: 'absent'

# Plugins : mailer
jenkins_plugin_mailer_default_suffix: 'bar.org'
Expand Down

0 comments on commit 7c9d503

Please sign in to comment.