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

Commit

Permalink
Split debian package builder configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
achaussier committed Mar 13, 2016
1 parent 78c2f63 commit 978076a
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 70 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
47 changes: 23 additions & 24 deletions 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 978076a

Please sign in to comment.