1
0
Fork 0

system packages for each host

This commit is contained in:
Chl 2020-03-16 02:40:26 +01:00
parent c930ae7d85
commit a29288aef4
3 changed files with 38 additions and 12 deletions

View file

@ -1,6 +1,12 @@
all: all:
hosts: hosts:
test-jenkins-via-ansible.example.net: test-jenkins-via-ansible.example.net:
jenkins_plugins_system_dependency_supp:
- php-gd
- php-xml
- php-mbstring
- php-pgsql
- postgresql
jobs: jobs:
template-php-v1: # Job template (deactivated) which can be manually cloned. template-php-v1: # Job template (deactivated) which can be manually cloned.
foo: foo:
@ -12,6 +18,24 @@ all:
baz: baz:
# Just a test to see if the default template can # Just a test to see if the default template can
# be run without any vars # 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: vars:
# Check if etckeeper is installed and /etc is clean # Check if etckeeper is installed and /etc is clean
checketckeeper: True checketckeeper: True

View file

@ -38,29 +38,28 @@ jenkins_plugins:
- ant - ant
- ws-cleanup # workspace-cleanup : I prefer to be clean at each build start - ws-cleanup # workspace-cleanup : I prefer to be clean at each build start
# Taken from jenkins-php.org # Taken from jenkins-php.org
- checkstyle
- cloverphp - cloverphp
- crap4j - crap4j
- dry
- htmlpublisher - htmlpublisher
- jdepend - jdepend
- plot - plot
- pmd
- violations - violations
- warnings
- xunit - 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: jenkins_plugins_system_dependency:
- ant - ant
- composer - composer
- php-gd
- php-xml
- php-mbstring
- php-mysql
- php-pgsql
- php-xdebug # for the code coverage - php-xdebug # for the code coverage
- mariadb-server
- postgresql
- phpunit # TODO: test if we can use the /vendor one ? - phpunit # TODO: test if we can use the /vendor one ?
- php-codesniffer - php-codesniffer
- phploc - phploc

View file

@ -44,7 +44,10 @@
when: item not in current_plugin_list.stdout_lines when: item not in current_plugin_list.stdout_lines
notify: safe-restart jenkins and wait 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 - name: Install system packages needed by Jenkins plugins
apt: apt:
name: "{{ jenkins_plugins_system_dependency }}" name: "{{ jenkins_plugins_system_dependency | union(jenkins_plugins_system_dependency_supp | default([])) }}"
state: present state: present