system packages for each host
This commit is contained in:
parent
c930ae7d85
commit
a29288aef4
3 changed files with 38 additions and 12 deletions
|
@ -1,6 +1,12 @@
|
|||
all:
|
||||
hosts:
|
||||
test-jenkins-via-ansible.example.net:
|
||||
jenkins_plugins_system_dependency_supp:
|
||||
- php-gd
|
||||
- php-xml
|
||||
- php-mbstring
|
||||
- php-pgsql
|
||||
- postgresql
|
||||
jobs:
|
||||
template-php-v1: # Job template (deactivated) which can be manually cloned.
|
||||
foo:
|
||||
|
@ -12,6 +18,24 @@ all:
|
|||
baz:
|
||||
# Just a test to see if the default template can
|
||||
# be run without any vars
|
||||
jenkins2.example.net:
|
||||
jenkins_plugins_system_dependency_supp:
|
||||
- php-gd
|
||||
- php-xml
|
||||
- php-mbstring
|
||||
- php-curl
|
||||
- php-zip
|
||||
- php-bcmath
|
||||
- php-intl
|
||||
- php-soap
|
||||
- php-mysql
|
||||
- mariadb-server
|
||||
jobs:
|
||||
template-php-v1: # Job template (deactivated) which can be manually cloned.
|
||||
jsmith-project:
|
||||
repository_url: git@github.com:jsmith/project.git
|
||||
branch_spec: 'refs/heads/feature/continuous-integration'
|
||||
#branch_spec: '*/develop'
|
||||
vars:
|
||||
# Check if etckeeper is installed and /etc is clean
|
||||
checketckeeper: True
|
||||
|
|
|
@ -38,29 +38,28 @@ jenkins_plugins:
|
|||
- ant
|
||||
- ws-cleanup # workspace-cleanup : I prefer to be clean at each build start
|
||||
# Taken from jenkins-php.org
|
||||
- checkstyle
|
||||
- cloverphp
|
||||
- crap4j
|
||||
- dry
|
||||
- htmlpublisher
|
||||
- jdepend
|
||||
- plot
|
||||
- pmd
|
||||
- violations
|
||||
- warnings
|
||||
- xunit
|
||||
- warnings-ng
|
||||
- checkstyle # integrated into 'warnings-ng' ?
|
||||
- dry # integrated into 'warnings-ng' ?
|
||||
- pmd # integrated into 'warnings-ng' ?
|
||||
- warnings # integrated into 'warnings-ng' ?
|
||||
#- configuration-as-code # this playbook needs more rework...
|
||||
#- job-dsl # too much work as of 2020-03
|
||||
|
||||
# note: you can add dependencies to a specific host with
|
||||
# the variable jenkins_plugins_system_dependency_supp
|
||||
jenkins_plugins_system_dependency_supp:
|
||||
jenkins_plugins_system_dependency:
|
||||
- ant
|
||||
- composer
|
||||
- php-gd
|
||||
- php-xml
|
||||
- php-mbstring
|
||||
- php-mysql
|
||||
- php-pgsql
|
||||
- php-xdebug # for the code coverage
|
||||
- mariadb-server
|
||||
- postgresql
|
||||
- phpunit # TODO: test if we can use the /vendor one ?
|
||||
- php-codesniffer
|
||||
- phploc
|
||||
|
|
|
@ -44,7 +44,10 @@
|
|||
when: item not in current_plugin_list.stdout_lines
|
||||
notify: safe-restart jenkins and wait
|
||||
|
||||
# For convenience, we concatenate two lists of packages :
|
||||
# - jenkins_plugins_system_dependency
|
||||
# - jenkins_plugins_system_dependency_supp
|
||||
- name: Install system packages needed by Jenkins plugins
|
||||
apt:
|
||||
name: "{{ jenkins_plugins_system_dependency }}"
|
||||
name: "{{ jenkins_plugins_system_dependency | union(jenkins_plugins_system_dependency_supp | default([])) }}"
|
||||
state: present
|
||||
|
|
Reference in a new issue