From 128e433db32e562291fdf0d1a5a28a35b7c1f6fd Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Thu, 15 Jul 2021 06:24:06 +0100 Subject: [PATCH 1/4] feat(rabbitmq): review PR 78 * https://github.com/saltstack-formulas/rabbitmq-formula/pull/78 --- ssf/formulas.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 2f20501b..c461e983 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -3871,6 +3871,7 @@ ssf: - '*': - ._mapdata - states.files + - .clean - . map_jinja: verification: From a4901720493828e604a91688025e460b01c37572 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Thu, 15 Jul 2021 08:37:09 +0100 Subject: [PATCH 2/4] feat(kitchen.*.yml): move `provisioner` block above `platforms` Ordering becomes `driver`, `provisioner`, `platforms`, `verifier` and `suites`. Main reason is because `platforms` can override the general values provided under `provisioner`, similar to the `driver` overrides. --- ssf/files/default/kitchen.windows.yml | 18 +++++++++--------- ssf/files/default/kitchen.yml | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ssf/files/default/kitchen.windows.yml b/ssf/files/default/kitchen.windows.yml index 68197185..ba52c9b6 100644 --- a/ssf/files/default/kitchen.windows.yml +++ b/ssf/files/default/kitchen.windows.yml @@ -9,15 +9,6 @@ driver: username: {{ testing_windows.github.driver.username }} password: {{ testing_windows.github.driver.password }} -platforms: - {%- for platform in proxyplatformswindows %} - {%- set os = platform[0] | d('') %} - {%- set os_ver = platform[1] | d('') %} - {%- set salt_ver = platform[2] | d('') %} - {%- set py_ver = platform[3] | d('') %} - - name: {{ os | replace('/', '-') }}-{{ os_ver | replace('.', '') }}-{{ salt_ver | replace('.', '-') }}-py{{ py_ver }} - {%- endfor %} - provisioner: salt_install: {{ testing_windows.github.platforms.provisioner.salt_install }} salt_bootstrap_options: {{ testing_windows.github.platforms.provisioner.salt_bootstrap_options }} @@ -33,3 +24,12 @@ provisioner: {%- endfor %} # yamllint enable rule:line-length {%- endif %} + +platforms: + {%- for platform in proxyplatformswindows %} + {%- set os = platform[0] | d('') %} + {%- set os_ver = platform[1] | d('') %} + {%- set salt_ver = platform[2] | d('') %} + {%- set py_ver = platform[3] | d('') %} + - name: {{ os | replace('/', '-') }}-{{ os_ver | replace('.', '') }}-{{ salt_ver | replace('.', '-') }}-py{{ py_ver }} + {%- endfor %} diff --git a/ssf/files/default/kitchen.yml b/ssf/files/default/kitchen.yml index 870415c1..650d2320 100644 --- a/ssf/files/default/kitchen.yml +++ b/ssf/files/default/kitchen.yml @@ -193,6 +193,16 @@ driver: {%- endfor %} {%- endif %} +provisioner: + name: salt_solo + log_level: {{ 'info' if semrel_formula in ['devstack'] else 'debug' }} + salt_install: none + require_chef: false + formula: {{ semrel_formula }} + salt_copy_filter: + - .kitchen + - .git + platforms: {#- Centralise duplication from here and `libcimatrix.jinja` #} {%- set ns_platforms = namespace(prev_comment='') %} @@ -247,16 +257,6 @@ platforms: {%- endif %} {%- endfor %} -provisioner: - name: salt_solo - log_level: {{ 'info' if semrel_formula in ['devstack'] else 'debug' }} - salt_install: none - require_chef: false - formula: {{ semrel_formula }} - salt_copy_filter: - - .kitchen - - .git - verifier: # https://www.inspec.io/ name: inspec From b7316cd027fbabe0c7bf99d23abec5e9b12ba8f4 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Thu, 15 Jul 2021 08:40:03 +0100 Subject: [PATCH 3/4] feat(kitchen): use general `run_command` of `/usr/lib/systemd/systemd` Switch to this instead of `/lib/systemd/systemd`, since there are actually more platforms that are based on that in reality. Found when investigating the discrepancy between the current `kitchen.yml` and the one in the `salt-bootstrap` repo. --- ssf/files/default/kitchen.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ssf/files/default/kitchen.yml b/ssf/files/default/kitchen.yml index 650d2320..e435a3fa 100644 --- a/ssf/files/default/kitchen.yml +++ b/ssf/files/default/kitchen.yml @@ -161,10 +161,11 @@ provision_command: {%- macro format_driver_run_cmds(os, os_ver) %} {%- filter indent(6) %} -{%- if os in ['opensuse/leap', 'opensuse/tmbl', 'arch-base'] %} -run_command: /usr/lib/systemd/systemd -{%- elif [os, os_ver] in [['amazonlinux', 1], ['centos', 6], ['gentoo/stage3', 'latest']] %} +{#- Ordering of `if` and `elif` is important here, since we need to differentiate between the two Gentoo platforms #} +{%- if [os, os_ver] in [['gentoo/stage3', 'latest']] %} run_command: /sbin/init +{%- elif os in ['debian', 'ubuntu', 'gentoo'] %} +run_command: /lib/systemd/systemd {%- endif %} {%- endfilter %} {%- endmacro %} @@ -173,7 +174,7 @@ driver: name: docker use_sudo: false privileged: true - run_command: /lib/systemd/systemd + run_command: /usr/lib/systemd/systemd {%- set run_options = kitchen.driver.run_options %} {%- if run_options %} {%- if semrel_formula == 'proftpd' %} From 21da3202694a06545a364a9aaa9024cff01dce77 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Sat, 17 Jul 2021 20:56:52 +0100 Subject: [PATCH 4/4] chore(defaults): update commit title and body --- ssf/defaults.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssf/defaults.yaml b/ssf/defaults.yaml index 327897f9..d952838f 100644 --- a/ssf/defaults.yaml +++ b/ssf/defaults.yaml @@ -64,8 +64,8 @@ ssf_node_anchors: # An alternative method could be to use: # `git describe --abbrev=0 --tags` # yamllint disable rule:line-length rule:quoted-strings - title: "chore(gemfile+lock): update to latest gem versions (2021-W28) [skip ci]" - body: '* Automated using https://github.com/myii/ssf-formula/pull/343' + title: "ci(kitchen): move '`'provisioner'`' block & update '`'run_command'`' [skip ci]" + body: '* Automated using https://github.com/myii/ssf-formula/pull/344' # yamllint enable rule:line-length rule:quoted-strings github: owner: 'saltstack-formulas'