From 65ca911be81ff2ac66c42b71b4dd4e9add562d1f Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Sat, 12 Dec 2020 00:56:45 +0000 Subject: [PATCH 01/45] docs(pre-commit): fix `rstcheck` violations & add `pre-commit` info --- docs/CONTRIBUTING.rst | 18 +++++++++++++++++- docs/TOFS_pattern.rst | 6 +++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/CONTRIBUTING.rst b/docs/CONTRIBUTING.rst index b7da8f49..b1524223 100644 --- a/docs/CONTRIBUTING.rst +++ b/docs/CONTRIBUTING.rst @@ -32,7 +32,7 @@ The entire process relies on the structure of commit messages to determine the v Full details are available in the upstream docs regarding the `Angular Commit Message Conventions `_. The key factor is that the first line of the commit message must follow this format: -.. code-block:: +.. code-block:: console type(scope): subject @@ -55,6 +55,22 @@ So based on the example above: * The ``(scope):`` will be shown in bold text without the brackets. * The ``subject`` follows the ``scope`` as standard text. +pre-commit +^^^^^^^^^^ + +`pre-commit `_ is configured for this formula, which you may +optionally use to ease the steps involved in submitting your changes, including +checking the formatting of your commit messages. + +First install the ``pre-commit`` package manager locally using the appropriate +`method `_, then run ``bin/install-hooks`` in the +formula's root directory and now ``pre-commit`` will run automatically on each +``git commit``. :: + + $ bin/install-hooks + pre-commit installed at .git/hooks/pre-commit + pre-commit installed at .git/hooks/commit-msg + Linting commit messages in Travis CI ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/TOFS_pattern.rst b/docs/TOFS_pattern.rst index 4fea5dda..dd2c17e5 100644 --- a/docs/TOFS_pattern.rst +++ b/docs/TOFS_pattern.rst @@ -64,7 +64,7 @@ Example: NTP before applying TOFS Let's work with the NTP example. A basic formula that follows the `design guidelines `_ has the following files and directories tree: -.. code-block:: +.. code-block:: console /srv/saltstack/salt-formulas/ntp-saltstack-formula/ ntp/ @@ -226,7 +226,7 @@ We can make different templates coexist for different minions, classified by any If we decide that we want ``os_family`` as switch, then we could provide the formula template variants for both the ``RedHat`` and ``Debian`` families. -.. code-block:: +.. code-block:: console /srv/saltstack/salt-formulas/ntp-saltstack-formula/ntp/files/ default/ @@ -449,7 +449,7 @@ Using sub-directories for ``components`` If your formula is composed of several components, you may prefer to provides files under sub-directories, like in the `systemd-formula `_. -.. code-block:: +.. code-block:: console /srv/saltstack/systemd-formula/ systemd/ From b0a854c2e8f0ffe94bbf76ee19581c8748d4a0b8 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 11 Dec 2020 23:05:15 +0000 Subject: [PATCH 02/45] feat(gitlab-ci): manage across formulas Include adapting for using `coqbot`. --- .gitlab-ci.yml | 83 +++++++++++++ .yamllint | 1 + pillar.example | 1 + ssf/config/formulas.sls | 1 + ssf/defaults.yaml | 11 +- ssf/files/default/.gitlab-ci.yml | 195 +++++++++++++++++++++++++++++++ ssf/formulas.yaml | 7 ++ ssf/libcimatrix.jinja | 17 ++- 8 files changed, 311 insertions(+), 5 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100644 ssf/files/default/.gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..d71e8c25 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +############################################################################### +# Define all YAML node anchors +############################################################################### +.node_anchors: + # `only` (also used for `except` where applicable) + only_branch_master_parent_repo: &only_branch_master_parent_repo + - 'master@myii/ssf-formula' + # `stage` + stage_lint: &stage_lint 'lint' + stage_release: &stage_release 'release' + # `image` + image_commitlint: &image_commitlint 'myii/ssf-commitlint:11' + image_precommit: &image_precommit + name: 'myii/ssf-pre-commit:2.9.2' + entrypoint: ['/bin/bash', '-c'] + image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14' + +############################################################################### +# Define stages and global variables +############################################################################### +stages: + - *stage_lint + - *stage_release +variables: + DOCKER_DRIVER: 'overlay2' + +############################################################################### +# `lint` stage: `commitlint` & `pre-commit` +############################################################################### +commitlint: + stage: *stage_lint + image: *image_commitlint + script: + # Add `upstream` remote to get access to `upstream/master` + - 'git remote add upstream ${CI_PROJECT_URL}.git' + - 'git fetch --all' + # Set default commit hashes for `--from` and `--to` + - 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"' + - 'export COMMITLINT_TO="${CI_COMMIT_SHA}"' + # `coqbot` adds a merge commit to test PRs on top of the latest commit in + # the repo; amend this merge commit message to avoid failure + - | + if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \ + && [ "${CI_COMMIT_BRANCH}" != "master" ]; then + git commit --amend -m \ + 'chore: reword coqbot merge commit message for commitlint' + export COMMITLINT_TO=HEAD + fi + # Run `commitlint` + - 'commitlint --from "${COMMITLINT_FROM}" + --to "${COMMITLINT_TO}" + --verbose' + +pre-commit: + stage: *stage_lint + image: *image_precommit + # https://pre-commit.com/#gitlab-ci-example + variables: + PRE_COMMIT_HOME: '${CI_PROJECT_DIR}/.cache/pre-commit' + cache: + key: '${CI_JOB_NAME}' + paths: + - '${PRE_COMMIT_HOME}' + script: + - 'pre-commit run --all-files --color always --verbose' + +############################################################################### +# `release` stage: `semantic-release` +############################################################################### +semantic-release: + only: *only_branch_master_parent_repo + stage: *stage_release + image: *image_semanticrelease + variables: + MAINTAINER_TOKEN: '${GH_TOKEN}' + script: + # Update `AUTHORS.md` + - '${HOME}/go/bin/maintainer contributor' + # Run `semantic-release` + - 'semantic-release' diff --git a/.yamllint b/.yamllint index 3824c504..89c71861 100644 --- a/.yamllint +++ b/.yamllint @@ -15,6 +15,7 @@ ignore: | test/**/states/**/*.sls .kitchen/ ssf/files/default/.cirrus.yml + ssf/files/default/.gitlab-ci.yml ssf/files/default/.pre-commit-config.yaml ssf/files/default/.rubocop.yml ssf/files/default/.salt-lint diff --git a/pillar.example b/pillar.example index 2f2ef71b..59f9f2c1 100644 --- a/pillar.example +++ b/pillar.example @@ -184,6 +184,7 @@ ssf: - inspec/README.md - .gitignore - .cirrus.yml + - .gitlab-ci.yml - .pre-commit-config.yaml - .rstcheck.cfg - .rubocop.yml diff --git a/ssf/config/formulas.sls b/ssf/config/formulas.sls index 345afc2b..935f0002 100644 --- a/ssf/config/formulas.sls +++ b/ssf/config/formulas.sls @@ -134,6 +134,7 @@ prepare-git-branch-for-{{ formula }}: owner: {{ owner }} formula: {{ formula }} codeowners: {{ context.codeowners | yaml }} + gitlab: {{ context.git.gitlab | yaml }} inspec_suites_kitchen: {{ inspec_suites_kitchen | yaml }} inspec_suites_matrix: {{ context.inspec_suites_matrix | yaml }} kitchen: {{ context.kitchen | yaml }} diff --git a/ssf/defaults.yaml b/ssf/defaults.yaml index cdca032e..cfc47f6d 100644 --- a/ssf/defaults.yaml +++ b/ssf/defaults.yaml @@ -28,6 +28,7 @@ ssf_node_anchors: - '/test/integration/**/README.md': '@saltstack-formulas/ssf' - '/.gitignore': '@saltstack-formulas/ssf' - '/.cirrus.yml': '@saltstack-formulas/ssf' + - '/.gitlab-ci.yml': '@saltstack-formulas/ssf' - '/.pre-commit-config.yaml': '@saltstack-formulas/ssf' - '/.rstcheck.cfg': '@saltstack-formulas/ssf' - '/.rubocop.yml': '@saltstack-formulas/ssf' @@ -58,8 +59,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: "test(map): verify '`'map.jinja'`' dump using '`'_mapdata'`' state" - body: '* Semi-automated using https://github.com/myii/ssf-formula/pull/271' + title: "ci(gitlab-ci): use GitLab CI as Travis CI replacement" + body: '* Automated using https://github.com/myii/ssf-formula/pull/275' # yamllint enable rule:line-length rule:quoted-strings github: owner: 'saltstack-formulas' @@ -71,6 +72,12 @@ ssf_node_anchors: fork: name: 'origin' branch: 'master' + # Currently supporting `ci_cd_only` for GitHub repos + gitlab: + # `coqbot` doesn't currently support sub-groups, only `owner/repo` + # owner: 'saltstack-formulas/formulas/github/saltstack-formulas' + owner: 'saltstack-formulas' + repo: '' inspec_suites_kitchen: &isk_default 0: &isk_suite_default name: 'default' diff --git a/ssf/files/default/.gitlab-ci.yml b/ssf/files/default/.gitlab-ci.yml new file mode 100644 index 00000000..edc964fe --- /dev/null +++ b/ssf/files/default/.gitlab-ci.yml @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +{%- from tplroot ~ "/libcimatrix.jinja" import format_ci_matrix with context %} + +{#- Prepare variable used for `saltcheck` #} +{%- set use_saltcheck = False %} +{%- if semrel_formula in ['cron'] %} +{%- set use_saltcheck = True %} +{%- endif %} +############################################################################### +# Define all YAML node anchors +############################################################################### +.node_anchors: + # `only` (also used for `except` where applicable) + only_branch_master_parent_repo: &only_branch_master_parent_repo + - 'master@{{ gitlab.owner }}/{{ gitlab.repo or formula }}' + # `stage` + stage_lint: &stage_lint 'lint' + stage_release: &stage_release 'release' + {%- if semrel_formula != 'ssf' %} + stage_test: &stage_test 'test' + {%- endif %} + # `image` + image_commitlint: &image_commitlint 'myii/ssf-commitlint:11' + {%- if semrel_formula != 'ssf' %} + image_dindruby: &image_dindruby 'myii/ssf-dind-ruby:2.7.1-r3' + {%- if semrel_formula == 'template' %} + image_dindrubybionic: &image_dindrubybionic 'myii/ssf-dind-ruby-bionic:1_2.5.1' + {%- endif %} + {%- endif %} + image_precommit: &image_precommit + name: 'myii/ssf-pre-commit:2.9.2' + entrypoint: ['/bin/bash', '-c'] + image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14' + {%- if semrel_formula != 'ssf' %} + # `services` + services_docker_dind: &services_docker_dind + - 'docker:dind' + # `variables` + # https://forum.gitlab.com/t/gitlab-com-ci-caching-rubygems/5627/3 + # https://bundler.io/v1.16/bundle_config.html + variables_bundler: &variables_bundler + BUNDLE_CACHE_PATH: '${CI_PROJECT_DIR}/.cache/bundler' + BUNDLE_WITHOUT: 'production' + # `cache` + cache_bundler: &cache_bundler + key: '${CI_JOB_STAGE}' + paths: + - '${BUNDLE_CACHE_PATH}' + {%- endif %} + +############################################################################### +# Define stages and global variables +############################################################################### +stages: + - *stage_lint + {%- if semrel_formula != 'ssf' %} + - *stage_test + {%- endif %} + - *stage_release +variables: + DOCKER_DRIVER: 'overlay2' + +############################################################################### +# `lint` stage: `commitlint` & `pre-commit` +############################################################################### +commitlint: + stage: *stage_lint + image: *image_commitlint + script: + # Add `upstream` remote to get access to `upstream/master` + - 'git remote add upstream ${CI_PROJECT_URL}.git' + - 'git fetch --all' + # Set default commit hashes for `--from` and `--to` + - 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"' + - 'export COMMITLINT_TO="${CI_COMMIT_SHA}"' + # `coqbot` adds a merge commit to test PRs on top of the latest commit in + # the repo; amend this merge commit message to avoid failure + - | + if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \ + && [ "${CI_COMMIT_BRANCH}" != "master" ]; then + git commit --amend -m \ + 'chore: reword coqbot merge commit message for commitlint' + export COMMITLINT_TO=HEAD + fi + # Run `commitlint` + - 'commitlint --from "${COMMITLINT_FROM}" + --to "${COMMITLINT_TO}" + --verbose' + +pre-commit: + stage: *stage_lint + image: *image_precommit + # https://pre-commit.com/#gitlab-ci-example + variables: + PRE_COMMIT_HOME: '${CI_PROJECT_DIR}/.cache/pre-commit' + cache: + key: '${CI_JOB_NAME}' + paths: + - '${PRE_COMMIT_HOME}' + script: + - 'pre-commit run --all-files --color always --verbose' + +{%- if platforms and not use_cirrus_ci %} + +############################################################################### +# Define `test` template +############################################################################### +.test_instance: + stage: *stage_test + image: *image_dindruby + services: *services_docker_dind + variables: *variables_bundler + cache: *cache_bundler + before_script: + # TODO: This should work from the env vars above automatically + - 'bundle config set path "${BUNDLE_CACHE_PATH}"' + - 'bundle config set without "${BUNDLE_WITHOUT}"' + - 'bundle install' + script: + # Alternative value to consider: `${CI_JOB_NAME}` + - '{{ script_kitchen.bin }} {{ script_kitchen.cmd }} "${DOCKER_ENV_CI_JOB_NAME}"' + +{%- if semrel_formula == 'template' %} +# +{%- endif %} + +############################################################################### +# `test` stage: each instance below uses the `test` template above +############################################################################### +## Define the rest of the matrix based on Kitchen testing +# Make sure the instances listed below match up with +# the `platforms` defined in `kitchen.yml` +{%- if semrel_formula == 'template' %} +# +{%- endif %} +{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_commented_includes, semrel_formula, width=0, use_gitlab_format=True) }} +{%- endif %} + +############################################################################### +# `release` stage: `semantic-release` +############################################################################### +semantic-release: + only: *only_branch_master_parent_repo + stage: *stage_release + image: *image_semanticrelease + variables: + MAINTAINER_TOKEN: '${GH_TOKEN}' + script: + # Update `AUTHORS.md` + - '${HOME}/go/bin/maintainer contributor' + # Run `semantic-release` + - 'semantic-release' diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 7ec2ad0d..7deeea86 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -697,6 +697,9 @@ ssf_node_anchors: .cirrus.yml: &file__--cirrus--yml <<: *file_default template: 'jinja' + .gitlab-ci.yml: &file__--gitlab-ci--yml + <<: *file_default + template: 'jinja' .pre-commit-config.yaml: &file__--pre-commit-config--yaml <<: *file_default template: 'jinja' @@ -4393,6 +4396,8 @@ ssf: github: owner: 'myii' repo: 'ssf-formula' + gitlab: + owner: 'myii' inspec_suites_kitchen: 0: inspec_yml: @@ -4410,6 +4415,7 @@ ssf: ignore: additional: - ssf/files/default/.cirrus.yml + - ssf/files/default/.gitlab-ci.yml - ssf/files/default/.pre-commit-config.yaml - ssf/files/default/.rubocop.yml - ssf/files/default/.salt-lint @@ -4431,6 +4437,7 @@ ssf: docs/TOFS_pattern.rst: *file__docs__TOFS_pattern--rst formula/libtofs.jinja: *file__formula__libtofs--jinja .gitignore: *file__--gitignore + .gitlab-ci.yml: *file__--gitlab-ci--yml .pre-commit-config.yaml: *file__--pre-commit-config--yaml .rstcheck.cfg: *file__--rstcheck--cfg .rubocop.yml: *file__--rubocop--yml diff --git a/ssf/libcimatrix.jinja b/ssf/libcimatrix.jinja index 478f7dbe..25dd6e6e 100644 --- a/ssf/libcimatrix.jinja +++ b/ssf/libcimatrix.jinja @@ -9,7 +9,8 @@ platforms_matrix_commented_includes, semrel_formula, width=4, - use_new_travis_format=False + use_new_travis_format=False, + use_gitlab_format=False ) %} {%- filter indent(width) %} {#- Centralise duplication from here and `kitchen.yml` #} @@ -57,10 +58,20 @@ {%- set include_instance = False %} {%- endif %} {%- endif %} -{#- Define `instance_and_env`, modified for new Travis format #} +{#- Define `instance_and_env`, modified for new Travis format or GitLab format #} {%- set instance_and_env = 'INSTANCE: ' %} {%- if use_new_travis_format %} {%- set instance_and_env = 'env: INSTANCE=' %} +{%- elif use_gitlab_format %} +{%- set instance_and_env = '' %} +{%- endif %} +{#- Define GitLab-specific formats #} +{%- if use_gitlab_format %} +{%- set list_format = '' %} +{%- set test_template = ": {extends: '.test_instance'}" %} +{%- else %} +{%- set list_format = '- ' %} +{%- set test_template = "" %} {%- endif %} {%- if include_instance %} {#- Only add a prefix if suite_name is given #} @@ -80,7 +91,7 @@ and [suite_name, os, os_ver, salt_ver] == ['default', 'amazonlinux', 2, 'master'] %} # https://community.letsencrypt.org/t/localhost-crt-does-not-exist-or-is-empty/103979 {%- endif %} -{{ comment }}- {{ instance_and_env }}{{ instance }} +{{ comment }}{{ list_format }}{{ instance_and_env }}{{ instance }}{{ test_template }} {%- endif %} {%- endif %} {%- endif %} From 619aaeeba2ea9adc2e6cf81cc21aa997ee7b1499 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Sat, 12 Dec 2020 00:25:22 +0000 Subject: [PATCH 03/45] feat(yamllint): add `.cache/` to ignores (to use in GitLab CI) --- .yamllint | 1 + ssf/defaults.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.yamllint b/.yamllint index 89c71861..f8e785dd 100644 --- a/.yamllint +++ b/.yamllint @@ -11,6 +11,7 @@ extends: 'default' # 4. All Jinja templates under `ssf/files/` (result in `yamllint` syntax errors) # Not disabling via. `*.yml` since we may end up with non-Jinja YAML files here ignore: | + .cache/ node_modules/ test/**/states/**/*.sls .kitchen/ diff --git a/ssf/defaults.yaml b/ssf/defaults.yaml index cfc47f6d..d54e8d4d 100644 --- a/ssf/defaults.yaml +++ b/ssf/defaults.yaml @@ -227,6 +227,7 @@ ssf_node_anchors: extends: 'default' ignore: default: + - '.cache/' - 'node_modules/' additional_ssf: - 'test/**/states/**/*.sls' From 887ff3954831cd4fc03f515b3806089c2c45aca8 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Sat, 12 Dec 2020 00:30:59 +0000 Subject: [PATCH 04/45] feat(pre-commit_semantic-release.sh): install `m2r` without `sudo` Required for method adopted in GitLab CI. --- pre-commit_semantic-release.sh | 2 +- ssf/files/default/pre-commit_semantic-release.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pre-commit_semantic-release.sh b/pre-commit_semantic-release.sh index ba805352..458b7b64 100755 --- a/pre-commit_semantic-release.sh +++ b/pre-commit_semantic-release.sh @@ -11,7 +11,7 @@ sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA ############################################################################### # Install `m2r` -sudo -H pip install m2r +pip3 install m2r # Copy and then convert the `.md` docs cp ./*.md docs/ diff --git a/ssf/files/default/pre-commit_semantic-release.sh b/ssf/files/default/pre-commit_semantic-release.sh index ba805352..458b7b64 100755 --- a/ssf/files/default/pre-commit_semantic-release.sh +++ b/ssf/files/default/pre-commit_semantic-release.sh @@ -11,7 +11,7 @@ sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA ############################################################################### # Install `m2r` -sudo -H pip install m2r +pip3 install m2r # Copy and then convert the `.md` docs cp ./*.md docs/ From a82143568e6009dc39d3ef4c1390ed3ad43fb8df Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Sat, 12 Dec 2020 00:34:39 +0000 Subject: [PATCH 05/45] feat(release.config.js): use parent repo for `repositoryUrl` --- release.config.js | 1 + ssf/files/default/release.config.js | 1 + ssf/formulas.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/release.config.js b/release.config.js index 6af7aa8f..14b47385 100644 --- a/release.config.js +++ b/release.config.js @@ -1,5 +1,6 @@ module.exports = { branch: 'master', + repositoryUrl: 'https://github.com/myii/ssf-formula', plugins: [ ['@semantic-release/commit-analyzer', { preset: 'angular', diff --git a/ssf/files/default/release.config.js b/ssf/files/default/release.config.js index 6af7aa8f..d7ba8b98 100644 --- a/ssf/files/default/release.config.js +++ b/ssf/files/default/release.config.js @@ -1,5 +1,6 @@ module.exports = { branch: 'master', + repositoryUrl: 'https://github.com/{{ owner }}/{{ formula }}', plugins: [ ['@semantic-release/commit-analyzer', { preset: 'angular', diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 7deeea86..bceee95c 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -736,6 +736,7 @@ ssf_node_anchors: <<: *file_default release.config.js: &file__release--config--js <<: *file_default + template: 'jinja' ssf: semrel_formulas: From 3f612cfdc6b25018ca2fcbcae1fb61e5ec3c44d0 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 13:07:03 +0000 Subject: [PATCH 06/45] feat(template): review PR 207 * https://github.com/saltstack-formulas/template-formula/pull/207 --- ssf/files/default/.travis.yml | 10 +++++++--- ssf/files/default/inspec/inspec.yml | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ssf/files/default/.travis.yml b/ssf/files/default/.travis.yml index 5ce4db20..a7de2acc 100644 --- a/ssf/files/default/.travis.yml +++ b/ssf/files/default/.travis.yml @@ -200,9 +200,13 @@ jobs: - env: 'Conversion' name: 'Test: bin/convert-formula.sh' script: - - git clone . tmp/converted-formula - - cd tmp/converted-formula - - DEBUG=true bin/convert-formula.sh converted + - export CONVERTED=test-the-use_this_template-button + - git clone . tmp/"$CONVERTED"-formula + - cd tmp/"$CONVERTED"-formula + - pyenv global 3.8 + - pip install pre-commit==2.7.1 + - bin/install-hooks + - DEBUG=true bin/convert-formula.sh "$CONVERTED" - '[ $(git rev-list HEAD --count) -eq 2 ]' # Quick visual check that correct files have been updated - git show --pretty="" --name-status diff --git a/ssf/files/default/inspec/inspec.yml b/ssf/files/default/inspec/inspec.yml index 24ff3e4c..bbe4281b 100644 --- a/ssf/files/default/inspec/inspec.yml +++ b/ssf/files/default/inspec/inspec.yml @@ -7,7 +7,8 @@ maintainer: SaltStack Formulas license: Apache-2.0 {%- set summary_heading = 'summary: ' %} {%- set summary_chars = summary_heading | length + suite.inspec_yml.summary | length %} -{%- if summary_chars > yamllint.rules.get('line-length').max %} +{%- if (summary_chars > yamllint.rules.get('line-length').max) or + ([semrel_formula, suite.name] == ['TEMPLATE', 'default']) %} # yamllint disable-line rule:line-length {%- endif %} {{ summary_heading }}{{ suite.inspec_yml.summary }} From af7d43b272e8167d1da2d08b1f1fc0a62a91ee4b Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 13:14:18 +0000 Subject: [PATCH 07/45] feat(template): review PR 209 * https://github.com/saltstack-formulas/template-formula/pull/209 --- ssf/defaults.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssf/defaults.yaml b/ssf/defaults.yaml index d54e8d4d..711a62a4 100644 --- a/ssf/defaults.yaml +++ b/ssf/defaults.yaml @@ -22,8 +22,8 @@ ssf_node_anchors: - '/docs/AUTHORS.rst': '@saltstack-formulas/ssf' - '/docs/CHANGELOG.rst': '@saltstack-formulas/ssf' - '/docs/TOFS_pattern.rst': '@saltstack-formulas/ssf' - - '/./libsaltcli.jinja': '@saltstack-formulas/ssf' - - '/./libtofs.jinja': '@saltstack-formulas/ssf' + - '/*/libsaltcli.jinja': '@saltstack-formulas/ssf' + - '/*/libtofs.jinja': '@saltstack-formulas/ssf' - '/test/integration/**/inspec.yml': '@saltstack-formulas/ssf' - '/test/integration/**/README.md': '@saltstack-formulas/ssf' - '/.gitignore': '@saltstack-formulas/ssf' From 6b9e83aaa7f08262587768789a8715be7eb2a41e Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 13:24:56 +0000 Subject: [PATCH 08/45] feat(template): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index bceee95c..5fe81b60 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -4900,7 +4900,7 @@ ssf: - [gentoo/stage3, latest, master, 3, gentoo] - [gentoo/stage3, systemd, master, 3, gentoo] - [arch-base , latest, 3000.3, 2, default] - - [centos , 6 , 2019.2, 2, upstart] + # # - [centos , 6 , 2019.2, 2, upstart] - [amazonlinux , 1 , 2019.2, 2, upstart] use_libsaltcli: true use_tofs: true From 0c5272498cf739c1d7e2371e1c6c5b260f55b4fb Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 16 Dec 2020 00:21:52 +0000 Subject: [PATCH 09/45] feat(docker): review PR 256 & defer CI testing until solution found * https://github.com/saltstack-formulas/docker-formula/pull/256 - Includes using TOFS for Kitchen & Travis templates. --- ssf/defaults.yaml | 16 +- ssf/files/tofs_docker-formula/.travis.yml | 159 ++++++++++++ ssf/files/tofs_docker-formula/kitchen.yml | 301 ++++++++++++++++++++++ ssf/formulas.yaml | 35 ++- 4 files changed, 497 insertions(+), 14 deletions(-) create mode 100644 ssf/files/tofs_docker-formula/.travis.yml create mode 100644 ssf/files/tofs_docker-formula/kitchen.yml diff --git a/ssf/defaults.yaml b/ssf/defaults.yaml index 711a62a4..bdf98f5d 100644 --- a/ssf/defaults.yaml +++ b/ssf/defaults.yaml @@ -507,7 +507,21 @@ ssf: name: 'ubuntu' dhcpd: *formula_default django: *formula_default - docker: *formula_default + docker: + <<: *formula_default + context: + <<: *context_default + inspec_suites_kitchen: + <<: *isk_default + 0: + <<: *isk_suite_default + name: 'archive' + 1: + <<: *isk_suite_default + name: 'package' + 2: + <<: *isk_suite_default + name: 'clean' eclipse: <<: *formula_default context: diff --git a/ssf/files/tofs_docker-formula/.travis.yml b/ssf/files/tofs_docker-formula/.travis.yml new file mode 100644 index 00000000..c73727c4 --- /dev/null +++ b/ssf/files/tofs_docker-formula/.travis.yml @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +## Machine config +os: 'linux' +arch: 'amd64' +dist: 'bionic' +version: '~> 1.0' + +## Language and cache config +language: 'ruby' +cache: 'bundler' + +env: + global: + - CHANGE_MINIKUBE_NONE_USER=true + - MINIKUBE_WANTUPDATENOTIFICATION=false + - MINIKUBE_WANTREPORTERRORPROMPT=false + - MINIKUBE_HOME=$HOME + - CHANGE_MINIKUBE_NONE_USER=true + - KUBECONFIG=$HOME/.kube/config + +## Services config +services: + - docker + +## Script to run for the test stage +script: + - env + - bin/kitchen verify "${INSTANCE}" + +## Stages and jobs matrix +stages: + - test + - name: 'release' + if: 'branch = master AND type != pull_request' +jobs: + include: + ## Define the test stage that runs the linters (and testing matrix, if applicable) + + # Run all of the linters in a single job + - language: 'node_js' + node_js: 'lts/*' + env: 'Lint' + name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint' + before_install: 'skip' + script: + # Install and run `salt-lint` + - pip install --user salt-lint + - git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst' + | xargs salt-lint + # Install and run `yamllint` + # Need at least `v1.17.0` for the `yaml-files` setting + - pip install --user yamllint>=1.17.0 + - yamllint -s . + # Install and run `rubocop` + - gem install rubocop + - rubocop -d + # Run `shellcheck` (already pre-installed in Travis) + - shellcheck --version + - git ls-files -- '*.sh' '*.bash' '*.ksh' + | xargs shellcheck + # Install and run `commitlint` + - npm i -D @commitlint/config-conventional + @commitlint/travis-cli + - commitlint-travis + + # Run `pre-commit` linters in a single job + - language: 'python' + env: 'Lint_pre-commit' + name: 'Lint: pre-commit' + before_install: 'skip' + cache: + directories: + - $HOME/.cache/pre-commit + script: + # Install and run `pre-commit` + - pip install pre-commit==2.7.1 + - pre-commit run --all-files --color always --verbose + - pre-commit run --color always --hook-stage manual --verbose commitlint-travis + + ## Define the rest of the matrix based on Kitchen testing + # Make sure the instances listed below match up with + # the `platforms` defined in `kitchen.yml` + # env: INSTANCE=archive-debian-10-master-py3 + - env: INSTANCE=package-debian-10-master-py3 + - env: INSTANCE=archive-ubuntu-1804-master-py3 + - env: INSTANCE=clean-ubuntu-1804-master-py3 + - env: INSTANCE=package-ubuntu-1804-master-py3 + - env: INSTANCE=archive-centos-8-master-py3 + - env: INSTANCE=package-centos-8-master-py3 + # env: INSTANCE=archive-fedora-31-master-py3 + - env: INSTANCE=package-fedora-31-master-py3 + - env: INSTANCE=archive-opensuse-leap-151-master-py3 + - env: INSTANCE=package-opensuse-leap-151-master-py3 + - env: INSTANCE=archive-amazonlinux-2-master-py3 + # env: INSTANCE=package-amazonlinux-2-master-py3 + # - env: INSTANCE=archive-debian-10-3000-2-py3 + # - env: INSTANCE=archive-debian-9-3000-2-py3 + # - env: INSTANCE=archive-ubuntu-1804-3000-2-py3 + # - env: INSTANCE=archive-centos-8-3000-2-py3 + # - env: INSTANCE=archive-centos-7-3000-2-py3 + # - env: INSTANCE=archive-fedora-31-3000-2-py3 + # - env: INSTANCE=archive-opensuse-leap-151-3000-2-py3 + # - env: INSTANCE=archive-amazonlinux-2-3000-2-py3 + # - env: INSTANCE=archive-ubuntu-1804-3000-2-py2 + # - env: INSTANCE=archive-ubuntu-1604-3000-2-py2 + # - env: INSTANCE=archive-archive-base-latest-3000-2-py2 + # - env: INSTANCE=archive-debian-10-2019-2-py3 + # - env: INSTANCE=archive-debian-9-2019-2-py3 + # - env: INSTANCE=archive-ubuntu-1804-2019-2-py3 + # - env: INSTANCE=archive-ubuntu-1604-2019-2-py3 + # - env: INSTANCE=archive-centos-8-2019-2-py3 + # - env: INSTANCE=archive-centos-7-2019-2-py3 + # - env: INSTANCE=archive-fedora-31-2019-2-py3 + # env: INSTANCE=archive-opensuse-leap-151-2019-2-py3 + # - env: INSTANCE=archive-amazonlinux-2-2019-2-py3 + # - env: INSTANCE=archive-centos-6-2019-2-py2 + # - env: INSTANCE=archive-amazonlinux-1-2019-2-py2 + - env: INSTANCE=archive-arch-base-latest-2019-2-py2 + - env: INSTANCE=package-arch-base-latest-2019-2-py2 + + ## Define the release stage that runs `semantic-release` + - stage: 'release' + language: 'node_js' + node_js: 'lts/*' + env: 'Release' + name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA' + before_install: 'skip' + script: + # Update `AUTHORS.md` + - export MAINTAINER_TOKEN=${GH_TOKEN} + - go get github.com/myii/maintainer + - maintainer contributor + + # Install all dependencies required for `semantic-release` + - npm i -D @semantic-release/changelog@3 + @semantic-release/exec@3 + @semantic-release/git@7 + deploy: + provider: 'script' + # Opt-in to `dpl v2` to complete the Travis build config validation (beta) + # * https://docs.travis-ci.com/user/build-config-validation + # Deprecated `skip_cleanup` can now be avoided, `cleanup: false` is by default + edge: true + # Run `semantic-release` + script: 'npx semantic-release@15.14' + +# Notification options: `always`, `never` or `change` +notifications: + webhooks: + if: 'repo = saltstack-formulas/docker-formula' + urls: + - https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=saltstack-formulas%2Fdocker-formula&ignore_pull_requests=true + on_success: always # default: always + on_failure: always # default: always + on_start: always # default: never + on_cancel: always # default: always + on_error: always # default: always diff --git a/ssf/files/tofs_docker-formula/kitchen.yml b/ssf/files/tofs_docker-formula/kitchen.yml new file mode 100644 index 00000000..eb08b516 --- /dev/null +++ b/ssf/files/tofs_docker-formula/kitchen.yml @@ -0,0 +1,301 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +# For help on this file's format, see https://kitchen.ci/ +driver: + name: docker + use_sudo: false + privileged: true + run_command: /lib/systemd/systemd + +# Make sure the platforms listed below match up with +# the `env.matrix` instances defined in `.travis.yml` +platforms: + ## SALT `master` + - name: debian-10-master-py3 + driver: + image: netmanagers/salt-master-py3:debian-10 + provision_command: + - apt-get -qq -y install conntrack + - name: ubuntu-1804-master-py3 + driver: + image: netmanagers/salt-master-py3:ubuntu-18.04 + provision_command: + - apt-get -qq -y install conntrack + - name: centos-8-master-py3 + driver: + image: netmanagers/salt-master-py3:centos-8 + provision_command: + - yum install conntrack-tools -y + - name: fedora-31-master-py3 + driver: + image: netmanagers/salt-master-py3:fedora-31 + provision_command: + - dnf install conntrack-tools -y + - name: opensuse-leap-151-master-py3 + driver: + image: netmanagers/salt-master-py3:opensuse-leap-15.1 + run_command: /usr/lib/systemd/systemd + provision_command: + - zypper --non-interactive install conntrack-tools + # Workaround to avoid intermittent failures on `opensuse-leap-15.1`: + # => SCP did not finish successfully (255): (Net::SCP::Error) + transport: + max_ssh_sessions: 1 + - name: amazonlinux-2-master-py3 + driver: + image: netmanagers/salt-master-py3:amazonlinux-2 + provision_command: + - yum install conntrack-tools -y + - name: arch-base-latest-master-py2 + driver: + image: netmanagers/salt-master-py2:arch-base-latest + run_command: /usr/lib/systemd/systemd + provision_command: + - (test -x /usr/bin/pacman-mirrors && /usr/bin/pacman-mirrors -g) || true + - pacman -S --noconfirm conntrack-tools + + ## SALT `3000.1` + - name: debian-10-3000-1-py3 + driver: + image: netmanagers/salt-3000.1-py3:debian-10 + provision_command: + - apt-get -qq -y install conntrack + - name: ubuntu-1804-3000-1-py3 + driver: + image: netmanagers/salt-3000.1-py3:ubuntu-18.04 + provision_command: + - apt-get -qq -y install conntrack + - name: centos-8-3000-1-py3 + driver: + image: netmanagers/salt-3000.1-py3:centos-8 + provision_command: + - yum install conntrack-tools -y + - name: fedora-31-3000-1-py3 + driver: + image: netmanagers/salt-3000.1-py3:fedora-31 + provision_command: + - dnf install conntrack-tools -y + - name: opensuse-leap-151-3000-1-py3 + driver: + image: netmanagers/salt-3000.1-py3:opensuse-leap-15.1 + run_command: /usr/lib/systemd/systemd + provision_command: + - zypper --non-interactive install conntrack-tools + # Workaround to avoid intermittent failures on `opensuse-leap-15.1`: + # => SCP did not finish successfully (255): (Net::SCP::Error) + transport: + max_ssh_sessions: 1 + - name: amazonlinux-2-3000-1-py3 + driver: + image: netmanagers/salt-3000.1-py3:amazonlinux-2 + provision_command: + - yum install conntrack-tools -y + - name: arch-base-latest-3000-1-py2 + driver: + image: netmanagers/salt-3000.1-py2:arch-base-latest + run_command: /usr/lib/systemd/systemd + provision_command: + - (test -x /usr/bin/pacman-mirrors && /usr/bin/pacman-mirrors -g) || true + - pacman -S --noconfirm conntrack-tools + + ## SALT `2019.2` + - name: debian-10-2019-2-py3 + driver: + image: netmanagers/salt-2019.2-py3:debian-10 + provision_command: + - apt-get -qq -y install conntrack + - name: debian-9-2019-2-py3 + driver: + image: netmanagers/salt-2019.2-py3:debian-9 + provision_command: + - apt-get -qq -y install conntrack + - name: ubuntu-1804-2019-2-py3 + driver: + image: netmanagers/salt-2019.2-py3:ubuntu-18.04 + provision_command: + - apt-get -qq -y install conntrack + - name: ubuntu-1604-2019-2-py3 + driver: + image: netmanagers/salt-2019.2-py3:ubuntu-16.04 + provision_command: + - apt-get -qq -y install conntrack + - name: centos-8-2019-2-py3 + driver: + image: netmanagers/salt-2019.2-py3:centos-8 + provision_command: + - yum install conntrack-tools -y + - name: centos-7-2019-2-py3 + driver: + image: netmanagers/salt-2019.2-py3:centos-7 + provision_command: + - yum install conntrack-tools -y + - name: fedora-31-2019-2-py3 + driver: + image: netmanagers/salt-2019.2-py3:fedora-31 + provision_command: + - yum install conntrack-tools -y + - name: opensuse-leap-151-2019-2-py3 + driver: + image: netmanagers/salt-2019.2-py3:opensuse-leap-15.1 + run_command: /usr/lib/systemd/systemd + provision_command: + - zypper --non-interactive install conntrack-tools + # Workaround to avoid intermittent failures on `opensuse-leap-15.1`: + # => SCP did not finish successfully (255): (Net::SCP::Error) + transport: + max_ssh_sessions: 1 + - name: amazonlinux-2-2019-2-py3 + driver: + image: netmanagers/salt-2019.2-py3:amazonlinux-2 + provision_command: + - yum install conntrack-tools -y + - name: ubuntu-1804-2019-2-py2 + driver: + image: netmanagers/salt-2019.2-py2:ubuntu-18.04 + provision_command: + - apt-get -qq -y install conntrack + - name: amazonlinux-1-2019-2-py2 + driver: + image: netmanagers/salt-2019.2-py2:amazonlinux-1 + run_command: /sbin/init + provision_command: + - yum install conntrack-tools -y + - name: arch-base-latest-2019-2-py2 + driver: + image: netmanagers/salt-2019.2-py2:arch-base-latest + run_command: /usr/lib/systemd/systemd + provision_command: + - (test -x /usr/bin/pacman-mirrors && /usr/bin/pacman-mirrors -g) || true + - pacman -S --noconfirm conntrack-tools + + ## SALT `2018.3` + - name: centos-7-2018-3-py3 + driver: + image: netmanagers/salt-2018.3-py3:centos-7 + provision_command: + - yum install conntrack-tools -y + - name: fedora-30-2018-3-py3 + driver: + image: netmanagers/salt-2018.3-py3:fedora-30 + provision_command: + - yum install conntrack-tools -y + - name: debian-9-2018-3-py2 + driver: + image: netmanagers/salt-2018.3-py2:debian-9 + provision_command: + - apt-get -qq -y install conntrack + - name: debian-8-2018-3-py2 + driver: + image: netmanagers/salt-2018.3-py2:debian-8 + provision_command: + - apt-get -qq -y install conntrack + - name: ubuntu-1804-2018-3-py2 + driver: + image: netmanagers/salt-2018.3-py2:ubuntu-18.04 + provision_command: + - apt-get -qq -y install conntrack + - name: ubuntu-1604-2018-3-py2 + driver: + image: netmanagers/salt-2018.3-py2:ubuntu-16.04 + provision_command: + - apt-get -qq -y install conntrack + - name: centos-6-2018-3-py2 + driver: + image: netmanagers/salt-2018.3-py2:centos-6 + run_command: /sbin/init + provision_command: + - yum install conntrack-tools -y + - name: opensuse-leap-151-2018-3-py2 + driver: + image: netmanagers/salt-2018.3-py2:opensuse-leap-15.1 + run_command: /usr/lib/systemd/systemd + provision_command: + - zypper --non-interactive install conntrack-tools + # Workaround to avoid intermittent failures on `opensuse-leap-15.1`: + # => SCP did not finish successfully (255): (Net::SCP::Error) + transport: + max_ssh_sessions: 1 + - name: amazonlinux-1-2018-3-py2 + driver: + image: netmanagers/salt-2018.3-py2:amazonlinux-1 + run_command: /sbin/init + provision_command: + - yum install conntrack-tools -y + - name: arch-base-latest-2018-3-py2 + driver: + image: netmanagers/salt-2018.3-py2:arch-base-latest + run_command: /usr/lib/systemd/systemd + provision_command: + - (test -x /usr/bin/pacman-mirrors && /usr/bin/pacman-mirrors -g) || true + - pacman -S --noconfirm conntrack-tools + +provisioner: + name: salt_solo + log_level: debug + salt_install: none + require_chef: false + formula: docker + salt_copy_filter: + - .kitchen + - .git + +verifier: + # https://www.inspec.io/ + name: inspec + sudo: true + # cli, documentation, html, progress, json, json-min, json-rspec, junit + reporter: + - cli + +suites: + - name: archive + provisioner: + state_top: + base: + '*': + # docker.clean + - docker + pillars: + top.sls: + base: + '*': + - docker + pillars_from_files: + docker.sls: test/salt/pillar/archive.sls + verifier: + inspec_tests: + - path: test/integration/archive + - name: package + provisioner: + state_top: + base: + '*': + # docker.clean + - docker + pillars: + top.sls: + base: + '*': + - docker + pillars_from_files: + docker.sls: test/salt/pillar/package.sls + verifier: + inspec_tests: + - path: test/integration/package + - name: clean + provisioner: + state_top: + base: + '*': + - docker.clean + pillars: + top.sls: + base: + '*': + - docker + pillars_from_files: + docker.sls: test/salt/pillar/archive.sls + verifier: + inspec_tests: + - path: test/integration/clean diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 5fe81b60..58707707 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -1349,19 +1349,28 @@ ssf: inspec_yml: summary: >- Verify that the docker formula is setup and configured correctly - provisioner: - state_top: - - '*': - - . - - .containers - platforms_matrix: - # [os , os_ver, salt_ver, py_ver, inspec_suite] - - [debian , 10 , master, 3, default] - - [debian , 9 , 2019.2, 3, default] - - [ubuntu , 18.04, 2019.2, 3, default] - - [arch-base , latest, 2019.2, 2, default] - - [debian , 9 , 2018.3, 2, default] - - [ubuntu , 16.04, 2017.7, 2, default] + 1: + inspec_yml: + summary: >- + Verify that the docker formula is setup and configured correctly + 2: + inspec_yml: + summary: >- + Verify that the docker formula is setup and configured correctly + inspec_suites_matrix: + - archive + - package + - clean + # Linux testing not working on GitLab CI yet, last matrix shown below + platforms_matrix: [] + # # # [os , os_ver, salt_ver, py_ver, inspec_suite] + # # - [debian , 10 , master, 3, default] + # # - [debian , 9 , 2019.2, 3, default] + # # - [ubuntu , 18.04, 2019.2, 3, default] + # # - [arch-base , latest, 2019.2, 2, default] + # # - [debian , 9 , 2018.3, 2, default] + # # - [ubuntu , 16.04, 2017.7, 2, default] + use_tofs: true yamllint: ignore: additional: From cf3a4fb2eeefe30525cef5ca4b664f76e4bd873f Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 11 Dec 2020 23:18:29 +0000 Subject: [PATCH 10/45] feat(travis): provide curtailed `.travis.yml` for reference purposes Originally was this: ``` feat(travis): ensure `.travis.yml` is always removed ``` However, took this comment into account: * https://github.com/saltstack-formulas/consul-formula/pull/52#issuecomment-744533646 But still removing `.travis.yml` for the `ssf-formula`. --- .travis.yml | 100 ---------------------- ssf/config/formulas.sls | 4 +- ssf/files/default/.travis.yml | 15 +++- ssf/files/tofs_docker-formula/.travis.yml | 15 +++- 4 files changed, 29 insertions(+), 105 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 78cadd98..00000000 --- a/.travis.yml +++ /dev/null @@ -1,100 +0,0 @@ -# -*- coding: utf-8 -*- -# vim: ft=yaml ---- -## Machine config -os: 'linux' -arch: 'amd64' -dist: 'bionic' -version: '~> 1.0' - -## Language and cache config -language: 'ruby' -cache: 'bundler' - -## Stages and jobs matrix -stages: - - test - - name: 'release' - if: 'branch = master AND type != pull_request' -jobs: - include: - ## Define the test stage that runs the linters (and testing matrix, if applicable) - - # Run all of the linters in a single job - - language: 'node_js' - node_js: 'lts/*' - env: 'Lint' - name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint' - before_install: 'skip' - script: - # Install and run `salt-lint` - - pip install --user salt-lint - - git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst' - | xargs salt-lint - # Install and run `yamllint` - # Need at least `v1.17.0` for the `yaml-files` setting - - pip install --user yamllint>=1.17.0 - - yamllint -s . - # Install and run `rubocop` - - gem install rubocop - - rubocop -d - # Run `shellcheck` (already pre-installed in Travis) - - shellcheck --version - - git ls-files -- '*.sh' '*.bash' '*.ksh' - | xargs shellcheck - # Install and run `commitlint` - - npm i -D @commitlint/config-conventional - @commitlint/travis-cli - - commitlint-travis --verbose - - # Run `pre-commit` linters in a single job - - language: 'python' - env: 'Lint_pre-commit' - name: 'Lint: pre-commit' - before_install: 'skip' - cache: - directories: - - $HOME/.cache/pre-commit - script: - # Install and run `pre-commit` - - pip install pre-commit==2.7.1 - - pre-commit run --all-files --color always --verbose - - pre-commit run --color always --hook-stage manual --verbose commitlint-travis - - ## Define the release stage that runs `semantic-release` - - stage: 'release' - language: 'node_js' - node_js: 'lts/*' - env: 'Release' - name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA' - before_install: 'skip' - script: - # Update `AUTHORS.md` - - export MAINTAINER_TOKEN=${GH_TOKEN} - - go get github.com/myii/maintainer - - maintainer contributor - - # Install all dependencies required for `semantic-release` - - npm i -D @semantic-release/changelog@3 - @semantic-release/exec@3 - @semantic-release/git@7 - deploy: - provider: 'script' - # Opt-in to `dpl v2` to complete the Travis build config validation (beta) - # * https://docs.travis-ci.com/user/build-config-validation - # Deprecated `skip_cleanup` can now be avoided, `cleanup: false` is by default - edge: true - # Run `semantic-release` - script: 'npx semantic-release@15.14' - -# Notification options: `always`, `never` or `change` -notifications: - webhooks: - if: 'repo = myii/ssf-formula' - urls: - - https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=myii%2Fssf-formula&ignore_pull_requests=false - on_success: always # default: always - on_failure: always # default: always - on_start: always # default: never - on_cancel: always # default: always - on_error: always # default: always diff --git a/ssf/config/formulas.sls b/ssf/config/formulas.sls index 935f0002..ff2c4fe8 100644 --- a/ssf/config/formulas.sls +++ b/ssf/config/formulas.sls @@ -101,10 +101,12 @@ prepare-git-branch-for-{{ formula }}: {#- Or if the file is `libsaltcli.jinja` and `use_libsaltcli` is `False` #} {#- Likewise, if running the state for TOFS files when `use_tofs` is `False` #} {#- Also remove the local `CONTRIBUTING` file to use the org-level file instead #} +{#- Furthermore, remove `.travis.yml` for the `ssf-formula` #} {%- if (semrel_file == '.cirrus.yml' and not use_cirrus_ci) or (semrel_file == 'formula/libsaltcli.jinja' and not use_libsaltcli) or (semrel_file in ['docs/TOFS_pattern.rst', 'formula/libtofs.jinja'] and not use_tofs) or - (semrel_file in ['docs/CONTRIBUTING.rst'] and formula not in ['.github', 'ssf-formula']) + (semrel_file in ['docs/CONTRIBUTING.rst'] and formula not in ['.github', 'ssf-formula']) or + (semrel_file in ['.travis.yml'] and formula in ['ssf-formula']) %} {%- set add_or_rm = ['rm', 'remove', 'absent'] %} {%- endif %} diff --git a/ssf/files/default/.travis.yml b/ssf/files/default/.travis.yml index a7de2acc..6e194986 100644 --- a/ssf/files/default/.travis.yml +++ b/ssf/files/default/.travis.yml @@ -1,6 +1,15 @@ # -*- coding: utf-8 -*- # vim: ft=yaml --- +################################################################################ +# NOTE: This file is UNMAINTAINED; it is provided for references purposes only. +# No guarantees are tendered that this structure will work after 2020. +################################################################################ +# * https://en.wikipedia.org/wiki/Travis_CI: +# - "... free open-source plans were removed in [sic] the end of 2020" +# - https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing +# - https://ropensci.org/technotes/2020/11/19/moving-away-travis/ +################################################################################ {%- from tplroot ~ "/libcimatrix.jinja" import format_ci_matrix with context %} {%- macro format_allow_failures(use_single_job_for_linters) %} @@ -104,8 +113,10 @@ script: ## Stages and jobs matrix stages: - test - - name: 'release' - if: 'branch = master AND type != pull_request' + # # As part of the switch away from Travis CI, ensure that the `release` stage + # # is not run inadvertently + # - name: 'release' + # if: 'branch = master AND type != pull_request' jobs: {{- format_allow_failures(travis.use_single_job_for_linters) }} include: diff --git a/ssf/files/tofs_docker-formula/.travis.yml b/ssf/files/tofs_docker-formula/.travis.yml index c73727c4..2fd48fba 100644 --- a/ssf/files/tofs_docker-formula/.travis.yml +++ b/ssf/files/tofs_docker-formula/.travis.yml @@ -1,6 +1,15 @@ # -*- coding: utf-8 -*- # vim: ft=yaml --- +################################################################################ +# NOTE: This file is UNMAINTAINED; it is provided for references purposes only. +# No guarantees are tendered that this structure will work after 2020. +################################################################################ +# * https://en.wikipedia.org/wiki/Travis_CI: +# - "... free open-source plans were removed in [sic] the end of 2020" +# - https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing +# - https://ropensci.org/technotes/2020/11/19/moving-away-travis/ +################################################################################ ## Machine config os: 'linux' arch: 'amd64' @@ -32,8 +41,10 @@ script: ## Stages and jobs matrix stages: - test - - name: 'release' - if: 'branch = master AND type != pull_request' + # # As part of the switch away from Travis CI, ensure that the `release` stage + # # is not run inadvertently + # - name: 'release' + # if: 'branch = master AND type != pull_request' jobs: include: ## Define the test stage that runs the linters (and testing matrix, if applicable) From a96c71a827a0ef329555370b95e78bf45247bbb3 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 08:21:31 +0000 Subject: [PATCH 11/45] feat(platforms_matrix_osfamily_debian): disable CI failures (e.g. EOL) Affects multiple formulas, found when fixing `apt-cacher`. --- ssf/formulas.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 58707707..527adb0e 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -613,8 +613,8 @@ ssf_node_anchors: - [ubuntu , 18.04, master, 3, default] - [debian , 9 , 2019.2, 3, default] - [ubuntu , 18.04, 2019.2, 3, default] - - [debian , 9 , 2018.3, 2, default] - - [ubuntu , 16.04, 2017.7, 2, default] + # # - [debian , 9 , 2018.3, 2, default] + # # - [ubuntu , 16.04, 2017.7, 2, default] platforms_matrix_osfamily_debian_new: &platforms_matrix_osfamily_debian_new # [os , os_ver, salt_ver, py_ver, inspec_suite] - [debian , 10 , master, 3, default] From d1459fd63b187d3b0e4e4986979e8715d18fdad7 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 08:25:38 +0000 Subject: [PATCH 12/45] feat(arvados): review PRs 8, 9 & 10 * https://github.com/saltstack-formulas/arvados-formula/pull/8 * https://github.com/saltstack-formulas/arvados-formula/pull/9 * https://github.com/saltstack-formulas/arvados-formula/pull/10 --- ssf/files/tofs_arvados-formula/.salt-lint | 1 + ssf/files/tofs_arvados-formula/kitchen.yml | 31 +++++++++++----------- ssf/formulas.yaml | 6 +++-- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/ssf/files/tofs_arvados-formula/.salt-lint b/ssf/files/tofs_arvados-formula/.salt-lint index 2389f56d..469c14e4 100644 --- a/ssf/files/tofs_arvados-formula/.salt-lint +++ b/ssf/files/tofs_arvados-formula/.salt-lint @@ -7,6 +7,7 @@ rules: ignore: | arvados/shell/config/files/default/shell-libpam-arvados.tmpl.jinja test/salt/pillar/examples/nginx_webshell_configuration.sls + test/salt/pillar/examples/nginx_passenger.sls skip_list: # Using `salt-lint` for linting other files as well, such as Jinja macros/templates - 205 # Use ".sls" as a Salt State file extension diff --git a/ssf/files/tofs_arvados-formula/kitchen.yml b/ssf/files/tofs_arvados-formula/kitchen.yml index b55392bb..53f989b3 100644 --- a/ssf/files/tofs_arvados-formula/kitchen.yml +++ b/ssf/files/tofs_arvados-formula/kitchen.yml @@ -55,6 +55,9 @@ platforms: - name: centos-7-3001-py3 driver: image: saltimages/salt-3001-py3:centos-7 + - name: amazonlinux-2-3001-py3 + driver: + image: saltimages/salt-3001-py3:amazonlinux-2 ## SALT `3000.3` - name: debian-10-3000-3-py3 @@ -100,18 +103,15 @@ suites: state_top: base: '*': - - example_add_snakeoil_certs + - single_host.host_entries + - single_host.snakeoil_certs - locale - nginx.passenger - postgres - arvados.repo - # - arvados.config - # - arvados.ruby - arvados.api - arvados.websocket - # keepproxy complains when using snakeoil certs, so we can't - # properly test it here until next version removes this limitation - # - arvados.keepproxy + - arvados.keepproxy - arvados.keepweb - arvados.controller - arvados.dispatcher @@ -129,7 +129,7 @@ suites: - example_nginx_controller # keepproxy expects to retrieve a list of services from API, so # installing/testing it without an api server running will fail - # - example_nginx_keepproxy + - example_nginx_keepproxy pillars_from_files: # yamllint disable rule:line-length arvados.sls: test/salt/pillar/arvados.sls @@ -139,12 +139,12 @@ suites: example_nginx_api.sls: test/salt/pillar/examples/nginx_api_configuration.sls example_nginx_websocket.sls: test/salt/pillar/examples/nginx_websocket_configuration.sls example_nginx_keepweb.sls: test/salt/pillar/examples/nginx_keepweb_configuration.sls - # example_nginx_keepproxy.sls: test/salt/pillar/examples/nginx_keepproxy_configuration.sls + example_nginx_keepproxy.sls: test/salt/pillar/examples/nginx_keepproxy_configuration.sls example_nginx_controller.sls: test/salt/pillar/examples/nginx_controller_configuration.sls # yamllint enable rule:line-length dependencies: - - name: example_add_snakeoil_certs - path: test/salt/states + - name: single_host + path: test/salt/states/examples - name: locale repo: git source: https://github.com/saltstack-formulas/locale-formula.git @@ -158,7 +158,7 @@ suites: inspec_tests: - path: test/integration/api - path: test/integration/websocket - # - path: test/integration/keepproxy + - path: test/integration/keepproxy - path: test/integration/keepweb - path: test/integration/controller @@ -170,7 +170,8 @@ suites: state_top: base: '*': - - example_add_snakeoil_certs + - single_host.host_entries + - single_host.snakeoil_certs - nginx.passenger - arvados.repo - arvados.workbench @@ -191,11 +192,11 @@ suites: example_nginx_workbench2.sls: test/salt/pillar/examples/nginx_workbench2_configuration.sls # yamllint enable rule:line-length dependencies: - - name: example_add_snakeoil_certs - path: test/salt/states + - name: single_host + path: test/salt/states/examples - name: nginx repo: git - source: https://github.com/saltstack-formulas/nginx-formula.git + source: https://github.com/netmanagers/nginx-formula.git verifier: inspec_tests: - path: test/integration/workbench diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 527adb0e..aa504350 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -1079,8 +1079,10 @@ ssf: # [os , os_ver, salt_ver, py_ver, inspec_suite] - [ubuntu , 18.04, master, 3, workbench] - [debian , 10 , 3001 , 3, api] - - [debian , 10 , 3001 , 3, shell] - - [ubuntu , 18.04, 3000.3, 2, keepstore] + # - [debian , 10 , 3001 , 3, shell] + - [centos , 7 , 3001 , 3, shell] + # - [ubuntu , 18.04, 3000.3, 2, keepstore] + - [centos , 7 , 3000.3, 3, keepstore] use_tofs: true yamllint: ignore: From 3ec867397883a1d7bc5237d92ab3fec1bf72e9c7 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 16 Dec 2020 05:34:57 +0000 Subject: [PATCH 13/45] feat(arvados): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index aa504350..260a5d26 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -1077,8 +1077,8 @@ ssf: # # - [arch-base , latest, 3000.3, 2] platforms_matrix: # [os , os_ver, salt_ver, py_ver, inspec_suite] - - [ubuntu , 18.04, master, 3, workbench] - - [debian , 10 , 3001 , 3, api] + # # - [ubuntu , 18.04, master, 3, workbench] + # # - [debian , 10 , 3001 , 3, api] # - [debian , 10 , 3001 , 3, shell] - [centos , 7 , 3001 , 3, shell] # - [ubuntu , 18.04, 3000.3, 2, keepstore] From 9be49924f2f39adb87e5172258a6953562f339ee Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 08:44:05 +0000 Subject: [PATCH 14/45] feat(platforms_matrix_without_arch): disable CI failures (e.g. EOL) Affects multiple formulas, found when fixing `bind`. --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 260a5d26..b421b079 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -640,7 +640,7 @@ ssf_node_anchors: - [amazonlinux , 2 , 2019.2, 3, default] - [fedora , 30 , 2018.3, 3, default] # - [arch-base , latest, 2018.3, 2, default] - - [centos , 6 , 2017.7, 2, default] + # # - [centos , 6 , 2017.7, 2, default] platforms_matrix_without_arch_new: &platforms_matrix_without_arch_new # [os , os_ver, salt_ver, py_ver, inspec_suite] - [debian , 10 , master, 3, default] From 7dd0b612a8e7c479410bf33b7ef8080b85103a4e Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 08:45:58 +0000 Subject: [PATCH 15/45] feat(platforms_matrix): disable CI failures (e.g. EOL) Affects multiple formulas, found when fixing `cert`. --- ssf/defaults.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/defaults.yaml b/ssf/defaults.yaml index bdf98f5d..8ff371b2 100644 --- a/ssf/defaults.yaml +++ b/ssf/defaults.yaml @@ -191,7 +191,7 @@ ssf_node_anchors: - [amazonlinux , 2 , 2019.2, 3, default] - [fedora , 30 , 2018.3, 3, default] - [arch-base , latest, 2018.3, 2, default] - - [centos , 6 , 2017.7, 2, default] + # # - [centos , 6 , 2017.7, 2, default] # To deal with excessive instances when mimicking `kitchen list -b` # If values are set, only use these as commented entries in the matrix platforms_matrix_commented_includes: [] From d502105a7b79d8ef3e88e544b222a78a12c23136 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 09:23:00 +0000 Subject: [PATCH 16/45] feat(epel): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index b421b079..a0d79ea0 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -1458,8 +1458,8 @@ ssf: - [amazonlinux , 2 , 2019.2, 3, default] - [centos , 7 , 2019.2, 2, default] # - [fedora , 30 , 2018.3, 3, default] - - [amazonlinux , 1 , 2018.3, 2, default] - - [centos , 6 , 2017.7, 2, default] + # # - [amazonlinux , 1 , 2018.3, 2, default] + # # - [centos , 6 , 2017.7, 2, default] semrel_files: *semrel_files_default exim: context: From 9520f43530854406c35a31825fbe23fa7b9cf01b Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 09:38:43 +0000 Subject: [PATCH 17/45] feat(dhcpd): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index a0d79ea0..c362d475 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -1323,7 +1323,7 @@ ssf: - [amazonlinux , 2 , 3000.3, 3, default] # Was working but file comparison now tripping up on spaces on empty lines # - [centos , 7 , 2019.2, 3, default] - - [centos , 6 , 2019.2, 2, default] + # # - [centos , 6 , 2019.2, 2, default] # - [arch-base , latest, 2019.2, 2, default] semrel_files: *semrel_files_default django: From c00623c2d2bacc4ae38309487ce6ec0c1875d6c9 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 09:40:52 +0000 Subject: [PATCH 18/45] feat(collectd): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index c362d475..3643760e 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -1181,7 +1181,7 @@ ssf: # - [arch-base , latest, 2019.2, 2, default] - [fedora , 30 , 2018.3, 3, default] - [opensuse/leap, 15.1 , 2018.3, 2, default] - - [centos , 6 , 2017.7, 2, default] + # # - [centos , 6 , 2017.7, 2, default] semrel_files: *semrel_files_default consul: context: From 431f9646c80c7fa68f0c734c3b11a18ef116e398 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 10:01:15 +0000 Subject: [PATCH 19/45] feat(redis): review PR 85 * https://github.com/saltstack-formulas/redis-formula/pull/85 --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 3643760e..17b906dc 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -3953,7 +3953,7 @@ ssf: provisioner: state_top: - '*': - - . + - .common - .server platforms_matrix: # [os , os_ver, salt_ver, py_ver, inspec_suite] From 2906da799676a43880183e2df0c8ce4caf004144 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 10:09:05 +0000 Subject: [PATCH 20/45] feat(redis): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 17b906dc..3e77a489 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -3962,9 +3962,9 @@ ssf: - [fedora , 31 , 2019.2, 3, default] # - [amazonlinux , 2 , 2019.2, 3, default] # - [arch-base , latest, 2019.2, 2, default] - - [debian , 9 , 2018.3, 2, default] - - [ubuntu , 16.04, 2018.3, 2, default] - - [centos , 6 , 2017.7, 2, default] + # # - [debian , 9 , 2018.3, 2, default] + # # - [ubuntu , 16.04, 2018.3, 2, default] + # # - [centos , 6 , 2017.7, 2, default] semrel_files: *semrel_files_default rkhunter: context: From f725bf6da5cadb619c303ebf64d0d71fda72f98c Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 10:07:27 +0000 Subject: [PATCH 21/45] feat(jetbrains): disable CI failures (e.g. EOL) Affects multiple formulas, found when fixing `jetbrains-webstorm`. --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 3e77a489..b70de785 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -653,7 +653,7 @@ ssf_node_anchors: platforms_matrix_jetbrains: &platforms_matrix_jetbrains # [os , os_ver, salt_ver, py_ver, inspec_suite] - [debian , 10 , master, 3, default] - - [centos , 8 , master, 3, default] + # # - [centos , 8 , master, 3, default] - [fedora , 32 , master, 3, default] - [opensuse/leap, 15.2 , master, 3, default] - [arch-base , latest, 2019.2, 2, arch] From aa0d7142f2ebfadaba403aa80647d66a9571171f Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 10:11:43 +0000 Subject: [PATCH 22/45] feat(fail2ban): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index b70de785..673b63ea 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -1510,7 +1510,7 @@ ssf: # - [fedora , 30 , 2018.3, 3, default] - [centos , 7 , 2018.3, 2, default] - [opensuse/leap, 15.1 , 2018.3, 2, default] - - [centos , 6 , 2017.7, 2, default] + # # - [centos , 6 , 2017.7, 2, default] semrel_files: *semrel_files_default firewalld: context: From f77527c63fc0d8a5d06d3b84e5b6da893a376d05 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 10:49:14 +0000 Subject: [PATCH 23/45] feat(keepalived): disable CI failures (e.g. EOL) --- ssf/files/default/.gitlab-ci.yml | 3 +++ ssf/formulas.yaml | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/ssf/files/default/.gitlab-ci.yml b/ssf/files/default/.gitlab-ci.yml index edc964fe..07349f2e 100644 --- a/ssf/files/default/.gitlab-ci.yml +++ b/ssf/files/default/.gitlab-ci.yml @@ -114,6 +114,9 @@ pre-commit: variables: *variables_bundler cache: *cache_bundler before_script: + {%- if semrel_formula == 'keepalived' %} + - 'apk --no-cache add ipvsadm' + {%- endif %} # TODO: This should work from the env vars above automatically - 'bundle config set path "${BUNDLE_CACHE_PATH}"' - 'bundle config set without "${BUNDLE_WITHOUT}"' diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 673b63ea..ac4ce719 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -2527,6 +2527,16 @@ ssf: inspec_yml: summary: >- Verify that the keepalived formula is setup and configured correctly + platforms_matrix: + # [os , os_ver, salt_ver, py_ver, inspec_suite] + - [debian , 10 , master, 3, default] + - [ubuntu , 18.04, 2019.2, 3, default] + # # - [opensuse/leap, 15.1 , 2019.2, 3, default] + - [amazonlinux , 2 , 2019.2, 3, default] + # # - [fedora , 30 , 2018.3, 3, default] + # # - [arch-base , latest, 2018.3, 2, default] + # # - [centos , 6 , 2017.7, 2, default] + # TODO: Find appropriate use of `script_kitchen` & `travis` sections below script_kitchen: pre: - sudo modprobe ip_vs From e59d8b32889ab855d7ba48a3ff6caa5b558415dd Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 10:56:45 +0000 Subject: [PATCH 24/45] feat(locale): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index ac4ce719..a11d82bd 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -2714,7 +2714,7 @@ ssf: - [amazonlinux , 2 , 2019.2, 3, redhat] - [opensuse/leap, 15.1 , 2018.3, 2, default] - [arch-base , latest, 2018.3, 2, default] - - [centos , 6 , 2017.7, 2, default] + # # - [centos , 6 , 2017.7, 2, default] semrel_files: *semrel_files_default logrotate: context: From ba55b7afc171406d072703a5c9d8c7361f6f73b5 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 11:01:42 +0000 Subject: [PATCH 25/45] feat(deepsea): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index a11d82bd..29eacc69 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -1245,14 +1245,14 @@ ssf: # # - [ubuntu , 20.04, master, 3, default] # # - [ubuntu , 18.04, master, 3, default] # # - [centos , 8 , master, 3, default] - - [fedora , 32 , master, 3, default] + # # - [fedora , 32 , master, 3, default] # # `make install` fails # # - [opensuse/leap, 15.2 , master, 3, default] # # - [debian , 9 , 3000.3, 3, default] - [ubuntu , 18.04, 3000.3, 3, default] - - [centos , 7 , 3000.3, 3, default] + # # - [centos , 7 , 3000.3, 3, default] - [opensuse/leap, 15.2 , 3000.3, 3, default] - - [fedora , 31 , 2019.2, 3, default] + # # - [fedora , 31 , 2019.2, 3, default] use_tofs: true semrel_files: *semrel_files_default devstack: From decda2e4aec43c20700486a84ddeb0fa79318ba1 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 11:06:38 +0000 Subject: [PATCH 26/45] feat(mongodb): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 29eacc69..3a0a98c2 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -2983,7 +2983,7 @@ ssf: - [debian , 10 , master, 3, default] # Not yet working with `20.04` - [ubuntu , 18.04, master, 3, default] - - [centos , 8 , master, 3, default] + # # - [centos , 8 , master, 3, default] # Not yet working with `32` - [fedora , 31 , master, 3, default] # - [opensuse/leap, 15.1 , master, 3, default] From 2aa5466b85835351366027dda4e01f89d731f474 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 11:08:47 +0000 Subject: [PATCH 27/45] feat(openldap): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 3a0a98c2..bb11ec37 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -3305,7 +3305,7 @@ ssf: # ... and PID file is not owned by root. Refusing. # # - [centos , 7 , 2019.2, 3, default] # - [fedora , 31 , 2019.2, 3, default] - - [centos , 6 , 2019.2, 2, default] + # # - [centos , 6 , 2019.2, 2, default] # Not configured at all for `arch-base` # https://wiki.archlinux.org/index.php/OpenLDAP # # - [arch-base , latest, 2019.2, 2, default] From e04739d81b8ab3df198f5141c651b6076a504d99 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 11:11:27 +0000 Subject: [PATCH 28/45] feat(rabbitmq): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index bb11ec37..776700a2 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -3947,8 +3947,8 @@ ssf: - [ubuntu , 18.04, master, 3, default] - [debian , 9 , 2019.2, 3, default] - [ubuntu , 18.04, 2019.2, 3, default] - - [debian , 9 , 2018.3, 2, default] - - [ubuntu , 16.04, 2017.7, 2, default] + # # - [debian , 9 , 2018.3, 2, default] + # # - [ubuntu , 16.04, 2017.7, 2, default] semrel_files: *semrel_files_default redis: context: From 582622edaa70a3b1820b9716baacea57215387ff Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 11:36:34 +0000 Subject: [PATCH 29/45] feat(rkhunter): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 776700a2..65dc6227 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -4020,7 +4020,7 @@ ssf: - [centos , 8 , 2019.2, 3, redhat] - [fedora , 30 , 2018.3, 3, redhat] - [opensuse/leap, 15.1 , 2018.3, 2, suse] - - [centos , 6 , 2017.7, 2, redhat] + # # - [centos , 6 , 2017.7, 2, redhat] travis: *travis_do_not_use_single_job_for_linters use_tofs: true semrel_files: *semrel_files_default From 090ed85c186c6a46932f953684d06ee8cba9f9f5 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 11:37:23 +0000 Subject: [PATCH 30/45] feat(stunnel): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 65dc6227..f61d1c09 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -4552,7 +4552,7 @@ ssf: - [ubuntu , 18.04, master, 3, default] - [debian , 9 , 2019.2, 3, default] - [ubuntu , 18.04, 2019.2, 3, default] - - [debian , 9 , 2018.3, 2, default] + # # - [debian , 9 , 2018.3, 2, default] semrel_files: *semrel_files_default sudoers: context: From 51092ec84b94d355d62aa432d69b4eb3e2ae0925 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 11:39:09 +0000 Subject: [PATCH 31/45] feat(rspamd): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index f61d1c09..df02218c 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -4101,7 +4101,7 @@ ssf: # # - [amazonlinux , 2 , master, 3, default] - [centos , 7 , 3000.3, 3, default] - [arch-base , latest, 3000.3, 2, default] - - [centos , 6 , 2019.2, 2, default] + # # - [centos , 6 , 2019.2, 2, default] yamllint: ignore: additional: From 1779b8886810222ec9c0d9a495e81d05405f6a19 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 11:40:20 +0000 Subject: [PATCH 32/45] feat(php): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index df02218c..16a208d6 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -3624,7 +3624,7 @@ ssf: - [amazonlinux , 2 , 2019.2, 3, redhat] - [fedora , 30 , 2018.3, 3, redhat] - [opensuse/leap, 15.1 , 2018.3, 2, suse] - - [centos , 6 , 2017.7, 2, redhat] + # # - [centos , 6 , 2017.7, 2, redhat] travis: *travis_do_not_use_single_job_for_linters use_tofs: true semrel_files: *semrel_files_default From c66a48d66b64acd4af75b16b8b9af112780635ec Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 11:42:14 +0000 Subject: [PATCH 33/45] feat(suricata): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 16a208d6..87fb8673 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -4631,7 +4631,7 @@ ssf: - [centos , 8 , 3001 , 3, default] - [ubuntu , 18.04, 3000.3, 3, default] - [ubuntu , 16.04, 3000.3, 2, default] - - [centos , 7 , 2019.2, 3, default] + # # - [centos , 7 , 2019.2, 3, default] yamllint: ignore: additional: From 7c161832f66e358724daf5c3696e69087ff28607 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 11:43:13 +0000 Subject: [PATCH 34/45] feat(telegraf): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 87fb8673..3f531140 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -4766,8 +4766,8 @@ ssf: - [fedora , 31 , master, 3, default] - [ubuntu , 18.04, 2019.2, 3, default] - [centos , 7 , 2019.2, 2, default] - - [debian , 9 , 2018.3, 2, default] - - [ubuntu , 16.04, 2018.3, 2, default] + # # - [debian , 9 , 2018.3, 2, default] + # # - [ubuntu , 16.04, 2018.3, 2, default] use_tofs: true semrel_files: *semrel_files_default template: From 0df82141acd28749119903c277ed6e573a226f8b Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 11:45:16 +0000 Subject: [PATCH 35/45] feat(nginx): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 3f531140..e18afb50 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -3069,7 +3069,7 @@ ssf: - [arch-base , latest, 2019.2, 2, default] - [fedora , 30 , 2018.3, 3, default] - [opensuse/leap, 15.1 , 2018.3, 2, default] - - [centos , 6 , 2017.7, 2, default] + # # - [centos , 6 , 2017.7, 2, default] travis: *travis_do_not_use_single_job_for_linters use_tofs: true semrel_files: *semrel_files_default From 7ed56ff46a94bf916e694222d0d51c35b1c96cb7 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 12:04:32 +0000 Subject: [PATCH 36/45] feat(users): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index e18afb50..d096b37d 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -5117,7 +5117,7 @@ ssf: - [amazonlinux , 2 , 2019.2, 3, default] - [fedora , 30 , 2018.3, 3, default] # - [arch-base , latest, 2018.3, 2, default] - - [centos , 6 , 2017.7, 2, default] + # # - [centos , 6 , 2017.7, 2, default] # To deal with excessive instances when mimicking `kitchen list -b` # If values are set, only use these as commented entries in the matrix platforms_matrix_commented_includes: From e51c882ade0faea94d0d3f5d14c0ca71cd3beba7 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 12:11:47 +0000 Subject: [PATCH 37/45] feat(varnish): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index d096b37d..21340dd6 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -5159,7 +5159,7 @@ ssf: repo: 'varnish-formula' inspec_suites_kitchen: 0: - excludes: *platforms_osfamily_suse_new + excludes: *platforms_osfamily_suse_new_15_2 inspec_yml: summary: >- Verify that the varnish formula is setup and configured correctly @@ -5175,7 +5175,7 @@ ssf: - '*': - .ng 1: - includes: *platforms_osfamily_suse_new + includes: *platforms_osfamily_suse_new_15_2 provisioner: pillars: - '*': @@ -5194,11 +5194,11 @@ ssf: platforms: *platforms_new platforms_matrix: # [os , os_ver, salt_ver, py_ver, inspec_suite] - - [debian , 10 , master, 3, default] + # # - [debian , 10 , master, 3, default] - [centos , 8 , master, 3, default] - - [ubuntu , 18.04, 3000.3, 3, default] + # # - [ubuntu , 18.04, 3000.3, 3, default] - [opensuse/leap, 15.2 , 3000.3, 3, suse] - - [amazonlinux , 2 , 3000.3, 3, default] + # # - [amazonlinux , 2 , 3000.3, 3, default] - [fedora , 31 , 2019.2, 3, default] - [arch-base , latest, 2019.2, 2, default] # TODO: Upgrade to latest TOFS in a subsequent PR, since a legacy version From dde4c9aa1f8024606fe03b7cc9941435bb1be411 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 13:36:51 +0000 Subject: [PATCH 38/45] feat(vault): disable CI failures (e.g. EOL) Note, easy to fix for `arch-py2` but left for now since we need to move on to using `arch-py3` instead. --- ssf/formulas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 21340dd6..4266fd15 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -5256,7 +5256,7 @@ ssf: - [fedora , 32 , master, 3, prod_server] - [opensuse/leap, 15.2 , 3000.3, 3, prod_server] - [amazonlinux , 2 , 3000.3, 3, prod_server] - - [arch-base , latest, 2019.2, 2, prod_server] + # # - [arch-base , latest, 2019.2, 2, prod_server] # To deal with excessive instances when mimicking `kitchen list -b` # If values are set, only use these as commented entries in the matrix platforms_matrix_commented_includes: From ae5d5b2fa93be1b8714cd0f261133dc748f1b2bb Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 13:43:37 +0000 Subject: [PATCH 39/45] feat(eclipse): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 4266fd15..100634fd 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -1419,10 +1419,10 @@ ssf: platforms: *platforms_new platforms_matrix: # [os , os_ver, salt_ver, py_ver, inspec_suite] - - [debian , 10 , master, 3, java] - - [centos , 8 , master, 3, java] - - [fedora , 32 , master, 3, javascript] - - [opensuse/leap, 15.2 , master, 3, cpp] + # # - [debian , 10 , master, 3, java] + # # - [centos , 8 , master, 3, java] + # # - [fedora , 32 , master, 3, javascript] + # # - [opensuse/leap, 15.2 , master, 3, cpp] # - [ubuntu , 18.04, 3000.3, 3, cpp] - [arch-base , latest, 2019.2, 2, java] # To deal with excessive instances when mimicking `kitchen list -b` From 63e2b42ddae2489ffd973b49eea8d8d6c182e794 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 14 Dec 2020 22:16:51 +0000 Subject: [PATCH 40/45] feat(salt): adjust matrix to remove Fluorine `2019.2` --- ssf/defaults.yaml | 6 ----- ssf/formulas.yaml | 64 +++-------------------------------------------- 2 files changed, 3 insertions(+), 67 deletions(-) diff --git a/ssf/defaults.yaml b/ssf/defaults.yaml index 8ff371b2..ad148c43 100644 --- a/ssf/defaults.yaml +++ b/ssf/defaults.yaml @@ -944,12 +944,6 @@ ssf: 2: <<: *isk_suite_default name: 'v3000-py2' - 3: - <<: *isk_suite_default - name: 'v201902-py3' - 4: - <<: *isk_suite_default - name: 'v201902-py2' sqldeveloper: *formula_default sqlplus: *formula_default ssf: *formula_default diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 100634fd..3bfcb8a7 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -4168,7 +4168,7 @@ ssf: - [ubuntu , 18.04, 3000.3, 3] - [centos , 8 , 3000.3, 3] - [centos , 7 , 3000.3, 3] - - [fedora , 31 , 3000.3, 3] + # # - [fedora , 31 , 3000.3, 3] - [opensuse/leap, 15.2 , 3000.3, 3] - [amazonlinux , 2 , 3000.3, 3] - [oraclelinux , 8 , 3000.3, 3] @@ -4206,55 +4206,10 @@ ssf: - .sls: 'test/salt/pillar/salt.sls' - v3000-py2.sls: 'test/salt/pillar/v3000-py2.sls' state_top: *state_top_salt - 3: - includes: - # [os , os_ver, salt_ver, py_ver] - - [debian , 10 , 2019.2, 3] - - [debian , 9 , 2019.2, 3] - - [ubuntu , 18.04, 2019.2, 3] - - [ubuntu , 16.04, 2019.2, 3] - - [centos , 8 , 2019.2, 3] - - [centos , 7 , 2019.2, 3] - - [fedora , 31 , 2019.2, 3] - - [opensuse/leap, 15.2 , 2019.2, 3] - - [amazonlinux , 2 , 2019.2, 3] - inspec_yml: - summary: >- - Verify that Salt `v201902-py3` is setup and configured - supports: *supports_all_including_oracle_and_gentoo - provisioner: - pillars: - - '*': - - . - - v201902-py3 - pillars_from_files: - - .sls: 'test/salt/pillar/salt.sls' - - v201902-py3.sls: 'test/salt/pillar/v201902-py3.sls' - state_top: *state_top_salt - 4: - includes: - # [os , os_ver, salt_ver, py_ver] - - [centos , 6 , 2019.2, 2] - - [amazonlinux , 1 , 2019.2, 2] - inspec_yml: - summary: >- - Verify that Salt `v201902-py2` is setup and configured - supports: *supports_all_including_oracle_and_gentoo - provisioner: - pillars: - - '*': - - . - - v201902-py2 - pillars_from_files: - - .sls: 'test/salt/pillar/salt.sls' - - v201902-py2.sls: 'test/salt/pillar/v201902-py2.sls' - state_top: *state_top_salt inspec_suites_matrix: - v3001-py3 - v3000-py3 - v3000-py2 - - v201902-py3 - - v201902-py2 platforms: # [os , os_ver, salt_ver, py_ver] - [debian , 10 , 3001 , 3] @@ -4276,7 +4231,7 @@ ssf: - [ubuntu , 18.04, 3000.3, 3] - [centos , 8 , 3000.3, 3] - [centos , 7 , 3000.3, 3] - - [fedora , 31 , 3000.3, 3] + # # - [fedora , 31 , 3000.3, 3] - [opensuse/leap, 15.2 , 3000.3, 3] - [amazonlinux , 2 , 3000.3, 3] - [oraclelinux , 8 , 3000.3, 3] @@ -4318,26 +4273,13 @@ ssf: # - [ubuntu , 18.04, 3000.3, 3, v3000-py3] # - [centos , 8 , 3000.3, 3, v3000-py3] # - [centos , 7 , 3000.3, 3, v3000-py3] - - [fedora , 31 , 3000.3, 3, v3000-py3] + # # - [fedora , 31 , 3000.3, 3, v3000-py3] - [opensuse/leap, 15.2 , 3000.3, 3, v3000-py3] - [amazonlinux , 2 , 3000.3, 3, v3000-py3] # - [oraclelinux , 8 , 3000.3, 3, v3000-py3] - [oraclelinux , 7 , 3000.3, 3, v3000-py3] - [ubuntu , 18.04, 3000.3, 2, v3000-py2] # - [ubuntu , 16.04, 3000.3, 2, v3000-py2] - # - [debian , 10 , 2019.2, 3, v201902-py3] - - [debian , 9 , 2019.2, 3, v201902-py3] - # - [ubuntu , 18.04, 2019.2, 3, v201902-py3] - - [ubuntu , 16.04, 2019.2, 3, v201902-py3] - # - [centos , 8 , 2019.2, 3, v201902-py3] - - [centos , 7 , 2019.2, 3, v201902-py3] - # # Installs `3000.3` - # # - [fedora , 31 , 2019.2, 3, v201902-py3] - # - [opensuse/leap, 15.2 , 2019.2, 3, v201902-py3] - # - [amazonlinux , 2 , 2019.2, 3, v201902-py3] - - [centos , 6 , 2019.2, 2, v201902-py2] - # # States don't complete - # # - [amazonlinux , 1 , 2019.2, 2, v201902-py2] use_tofs: true yamllint: ignore: From 10e2af7d2430c132fcfc85a64d6ba6909bba138e Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 15 Dec 2020 21:35:58 +0000 Subject: [PATCH 41/45] feat(tomcat): disable CI failures (e.g. EOL) --- ssf/formulas.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 3bfcb8a7..b682faab 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -4941,7 +4941,8 @@ ssf: - [fedora , 32 , master, 3, default] - [opensuse/leap, 15.2 , 3000.3, 3, default] - [amazonlinux , 2 , 3000.3, 3, default] - - [debian , 9 , 2019.2, 3, default] + # # Broken with recent PR (#119?) + # # - [debian , 9 , 2019.2, 3, default] - [centos , 7 , 2019.2, 3, default] # Tomcat appears to require an older version of JVM on Arch # yamllint disable-line rule:line-length From ccb55250021e007d2f24d48e5edecf4ec67c656f Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 16 Dec 2020 01:55:40 +0000 Subject: [PATCH 42/45] feat(lvm): defer CI testing until solution found --- ssf/formulas.yaml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index b682faab..e034ffaa 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -2776,18 +2776,19 @@ ssf: inspec_suites_matrix: - loop4-loop5 - loop5-loop6 - platforms_matrix: - # Note, the commented lines are the only ones that didn't work - # Everything else working, even if lines have been removed - # Keeping hold of this "working out" for future reference - # One `#` where working but not using, two `# #` for not working at all - # Update: the lines the have been modified due to `2019.2.2` can no longer - # be guaranteed (i.e. working or not) - # [os , os_ver, salt_ver, py_ver, inspec_suite] - - [ubuntu , 18.04, master, 3, loop5-loop6] - - [centos , 8 , master, 3, loop5-loop6] - - [amazonlinux , 2 , 2019.2, 3, loop5-loop6] - - [opensuse/leap, 15.1 , 2018.3, 2, loop5-loop6] + # Linux testing not working on GitLab CI yet, last matrix shown below + platforms_matrix: [] + # # # Note, the commented lines are the only ones that didn't work + # # # Everything else working, even if lines have been removed + # # # Keeping hold of this "working out" for future reference + # # # One `#` where working but not using, two `# #` for not working at all + # # # Update: the lines the have been modified due to `2019.2.2` can no longer + # # # be guaranteed (i.e. working or not) + # # # [os , os_ver, salt_ver, py_ver, inspec_suite] + # # - [ubuntu , 18.04, master, 3, loop5-loop6] + # # - [centos , 8 , master, 3, loop5-loop6] + # # - [amazonlinux , 2 , 2019.2, 3, loop5-loop6] + # # - [opensuse/leap, 15.1 , 2018.3, 2, loop5-loop6] # To deal with excessive instances when mimicking `kitchen list -b` # If values are set, only use these as commented entries in the matrix platforms_matrix_commented_includes: From c11fc0cf6c87296c8f765475a8361309f06cbe05 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 16 Dec 2020 01:56:34 +0000 Subject: [PATCH 43/45] feat(iscsi): defer CI testing until solution found --- ssf/formulas.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index e034ffaa..89230ab9 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -1840,14 +1840,15 @@ ssf: - redhat - arch platforms: *platforms_new - platforms_matrix: - # [os , os_ver, salt_ver, py_ver, inspec_suite] - - [ubuntu , 18.04, master, 3, default] - - [centos , 8 , master, 3, redhat] - - [fedora , 32 , master, 3, redhat] - - [opensuse/leap, 15.2 , master, 3, default] - - [amazonlinux , 2 , master, 3, redhat] - # # - [arch-base , latest, 3000.3, 2, arch] + # Linux testing not working on GitLab CI yet, last matrix shown below + platforms_matrix: [] + # # # [os , os_ver, salt_ver, py_ver, inspec_suite] + # # - [ubuntu , 18.04, master, 3, default] + # # - [centos , 8 , master, 3, redhat] + # # - [fedora , 32 , master, 3, redhat] + # # - [opensuse/leap, 15.2 , master, 3, default] + # # - [amazonlinux , 2 , master, 3, redhat] + # # # # - [arch-base , latest, 3000.3, 2, arch] use_tofs: true yamllint: ignore: From 1c623866ef62b47b9e8a7883b5f70c70d68c5b34 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 16 Dec 2020 05:55:58 +0000 Subject: [PATCH 44/45] feat(icinga2): defer CI testing until solution found Hits the 60-minute pipeline limit, even when using the `dind-bionic` Docker image, e.g.: * https://gitlab.com/myii/icinga2-formula/-/pipelines/230489264 --- ssf/formulas.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index 89230ab9..8e6a0f56 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -1664,7 +1664,9 @@ ssf: state_top: - '*': - .icinga-web2 - platforms_matrix: *platforms_matrix_osfamily_debian + # Linux testing not working on GitLab CI yet, last matrix shown below + platforms_matrix: [] + # platforms_matrix: *platforms_matrix_osfamily_debian yamllint: ignore: additional: From e8deac3ecfe8540f9421d2232e15d7dea076eb2a Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 16 Dec 2020 14:12:56 +0000 Subject: [PATCH 45/45] feat(ssf): use TOFS override for `CONTRIBUTING` document --- docs/CONTRIBUTING.rst | 1 - .../tofs_ssf-formula/docs/CONTRIBUTING.rst | 174 ++++++++++++++++++ 2 files changed, 174 insertions(+), 1 deletion(-) create mode 100644 ssf/files/tofs_ssf-formula/docs/CONTRIBUTING.rst diff --git a/docs/CONTRIBUTING.rst b/docs/CONTRIBUTING.rst index b1524223..23f3f22a 100644 --- a/docs/CONTRIBUTING.rst +++ b/docs/CONTRIBUTING.rst @@ -172,4 +172,3 @@ An example of that: BREAKING CHANGE: With the removal of all of the `.sls` files under `template package`, this formula no longer supports the installation of packages. - diff --git a/ssf/files/tofs_ssf-formula/docs/CONTRIBUTING.rst b/ssf/files/tofs_ssf-formula/docs/CONTRIBUTING.rst new file mode 100644 index 00000000..23f3f22a --- /dev/null +++ b/ssf/files/tofs_ssf-formula/docs/CONTRIBUTING.rst @@ -0,0 +1,174 @@ +.. _contributing: + +How to contribute +================= + +This document will eventually outline all aspects of guidance to make your contributing experience a fruitful and enjoyable one. +What it already contains is information about *commit message formatting* and how that directly affects the numerous automated processes that are used for this repo. +It also covers how to contribute to this *formula's documentation*. + +.. contents:: **Table of Contents** + +Overview +-------- + +Submitting a pull request is more than just code! +To achieve a quality product, the *tests* and *documentation* need to be updated as well. +An excellent pull request will include these in the changes, wherever relevant. + +Commit message formatting +------------------------- + +Since every type of change requires making Git commits, +we will start by covering the importance of ensuring that all of your commit +messages are in the correct format. + +Automation of multiple processes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This formula uses `semantic-release `_ for automating numerous processes such as bumping the version number appropriately, creating new tags/releases and updating the changelog. +The entire process relies on the structure of commit messages to determine the version bump, which is then used for the rest of the automation. + +Full details are available in the upstream docs regarding the `Angular Commit Message Conventions `_. +The key factor is that the first line of the commit message must follow this format: + +.. code-block:: console + + type(scope): subject + + +* E.g. ``docs(contributing): add commit message formatting instructions``. + +Besides the version bump, the changelog and release notes are formatted accordingly. +So based on the example above: + +.. + + .. raw:: html + +

Documentation

+ + * **contributing:** add commit message formatting instructions + + +* The ``type`` translates into a ``Documentation`` sub-heading. +* The ``(scope):`` will be shown in bold text without the brackets. +* The ``subject`` follows the ``scope`` as standard text. + +pre-commit +^^^^^^^^^^ + +`pre-commit `_ is configured for this formula, which you may +optionally use to ease the steps involved in submitting your changes, including +checking the formatting of your commit messages. + +First install the ``pre-commit`` package manager locally using the appropriate +`method `_, then run ``bin/install-hooks`` in the +formula's root directory and now ``pre-commit`` will run automatically on each +``git commit``. :: + + $ bin/install-hooks + pre-commit installed at .git/hooks/pre-commit + pre-commit installed at .git/hooks/commit-msg + +Linting commit messages in Travis CI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This formula uses `commitlint `_ for checking commit messages during CI testing. +This ensures that they are in accordance with the ``semantic-release`` settings. + +For more details about the default settings, refer back to the ``commitlint`` `reference rules `_. + +Relationship between commit type and version bump +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This formula applies some customisations to the defaults, as outlined in the table below, +based upon the `type `_ of the commit: + +.. list-table:: + :name: commit-type-vs-version-bump + :header-rows: 1 + :stub-columns: 0 + :widths: 1,2,3,1,1 + + * - Type + - Heading + - Description + - Bump (default) + - Bump (custom) + * - ``build`` + - Build System + - Changes related to the build system + - – + - + * - ``chore`` + - – + - Changes to the build process or auxiliary tools and libraries such as + documentation generation + - – + - + * - ``ci`` + - Continuous Integration + - Changes to the continuous integration configuration + - – + - + * - ``docs`` + - Documentation + - Documentation only changes + - – + - 0.0.1 + * - ``feat`` + - Features + - A new feature + - 0.1.0 + - + * - ``fix`` + - Bug Fixes + - A bug fix + - 0.0.1 + - + * - ``perf`` + - Performance Improvements + - A code change that improves performance + - 0.0.1 + - + * - ``refactor`` + - Code Refactoring + - A code change that neither fixes a bug nor adds a feature + - – + - 0.0.1 + * - ``revert`` + - Reverts + - A commit used to revert a previous commit + - – + - 0.0.1 + * - ``style`` + - Styles + - Changes that do not affect the meaning of the code (white-space, + formatting, missing semi-colons, etc.) + - – + - 0.0.1 + * - ``test`` + - Tests + - Adding missing or correcting existing tests + - – + - 0.0.1 + +Use ``BREAKING CHANGE`` to trigger a ``major`` version change +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Adding ``BREAKING CHANGE`` to the footer of the extended description of the commit message will **always** trigger a ``major`` version change, no matter which type has been used. +This will be appended to the changelog and release notes as well. +To preserve good formatting of these notes, the following format is prescribed: + +* ``BREAKING CHANGE: .`` + +An example of that: + +.. code-block:: git + + ... + + BREAKING CHANGE: With the removal of all of the `.sls` files under + `template package`, this formula no longer supports the installation of + packages.