Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Debian 11 Bullseye & update yamllint configuration #345

Merged
merged 8 commits into from
Jul 18, 2021
16 changes: 9 additions & 7 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
extends: 'default'

# Files to ignore completely
# 1. All YAML files under directory `.cache/`, introduced during the GitLab CI run
# 2. All YAML files under directory `.git/`
# 3. All YAML files under directory `node_modules/`, introduced during the Travis run
# 4. Any SLS files under directory `test/`, which are actually state files
# 5. Any YAML files under directory `.kitchen/`, introduced during local testing
# 6. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
# 7. All Jinja templates under `ssf/files/` (result in `yamllint` syntax errors)
# 1. All YAML files under directory `.bundle/`, introduced if gems are installed locally
# 2. All YAML files under directory `.cache/`, introduced during the CI run
# 3. All YAML files under directory `.git/`
# 4. All YAML files under directory `node_modules/`, introduced during the CI run
# 5. Any SLS files under directory `test/`, which are actually state files
# 6. Any YAML files under directory `.kitchen/`, introduced during local testing
# 7. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
# 8. 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: |
.bundle/
.cache/
.git/
node_modules/
Expand Down
1 change: 1 addition & 0 deletions ssf/config/formulas.sls
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ remove-previous-file-location-for-{{ formula }}-{{ dest_file }}:
map_jinja: {{ map_jinja | yaml }}
platforms: {{ context.platforms | yaml }}
platforms_matrix: {{ context.platforms_matrix | yaml }}
platforms_matrix_allow_failure: {{ context.platforms_matrix_allow_failure | yaml }}
platforms_matrix_commented_includes: {{ context.platforms_matrix_commented_includes | yaml }}
proxyplatformswindows: {{ ssf.proxyplatformswindows | yaml }}
rubocop: {{ context.rubocop | yaml }}
Expand Down
20 changes: 13 additions & 7 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ ssf_node_anchors:
# An alternative method could be to use:
# `git describe --abbrev=0 --tags`
# yamllint disable rule:line-length rule:quoted-strings
title: "ci(kitchen): move '`'provisioner'`' block & update '`'run_command'`' [skip ci]"
body: '* Automated using https://github.com/myii/ssf-formula/pull/344'
title: "ci: add Debian 11 Bullseye & update '`'yamllint'`' configuration [skip ci]"
body: '* Automated using https://github.com/myii/ssf-formula/pull/345'
# yamllint enable rule:line-length rule:quoted-strings
github:
owner: 'saltstack-formulas'
Expand Down Expand Up @@ -169,6 +169,9 @@ ssf_node_anchors:
# - [gentoo/stage3, 0 , master, 0, default]
# - [almalinux , 0 , master, 0, default]
# - [rockylinux , 0 , master, 0, default]
# Instances to allow failure for, such as new platforms which aren't
# currently working because waiting for upstream repos to be provided
platforms_matrix_allow_failure: []
# 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: []
Expand Down Expand Up @@ -237,6 +240,7 @@ ssf_node_anchors:
extends: 'default'
ignore:
default:
- '.bundle/'
- '.cache/'
- '.git/'
- 'node_modules/'
Expand Down Expand Up @@ -339,11 +343,11 @@ ssf:
# - [fedora , 35 , tiamat, 3] # fedo-35.0-tiamat-py3
- [fedora , 35 , master, 3] # fedo-35.0-master-py3
- [fedora , 35 , 3003.1, 3] # fedo-35.0-3003.1-py3
- [fedora , 35 , 3003.0, 3] # fedo-35.0-3003.0-py3
- [fedora , 35 , 3002.6, 3] # fedo-35.0-3002.6-py3
- [fedora , 35 , 3001.7, 3] # fedo-35.0-3001.7-py3
saltimages:
### `tiamat-py3`
- [debian , 11 , tiamat, 3] # debi-11.0-tiamat-py3
- [debian , 10 , tiamat, 3] # debi-10.0-tiamat-py3
- [debian , 9 , tiamat, 3] # debi-09.0-tiamat-py3
- [ubuntu , 20.04, tiamat, 3] # ubun-20.0-tiamat-py3
Expand All @@ -363,6 +367,7 @@ ssf:
- [rockylinux , 8 , tiamat, 3] # rock-08.0-tiamat-py3

### `master-py3`
- [debian , 11 , master, 3] # debi-11.0-master-py3
- [debian , 10 , master, 3] # debi-10.0-master-py3
- [debian , 9 , master, 3] # debi-09.0-master-py3
- [ubuntu , 20.04, master, 3] # ubun-20.0-master-py3
Expand All @@ -384,6 +389,7 @@ ssf:
- [rockylinux , 8 , master, 3] # rock-08.0-master-py3

### `3003.1-py3`
- [debian , 11 , 3003.1, 3] # debi-11.0-3003.1-py3
- [debian , 10 , 3003.1, 3] # debi-10.0-3003.1-py3
- [debian , 9 , 3003.1, 3] # debi-09.0-3003.1-py3
- [ubuntu , 20.04, 3003.1, 3] # ubun-20.0-3003.1-py3
Expand All @@ -403,6 +409,7 @@ ssf:
- [gentoo/stage3, systemd, 3003.1, 3] # gent-sysd-3003.1-py3

### `3002.6-py3`
- [debian , 11 , 3002.6, 3] # debi-11.0-3002.6-py3
- [debian , 10 , 3002.6, 3] # debi-10.0-3002.6-py3
- [debian , 9 , 3002.6, 3] # debi-09.0-3002.6-py3
- [ubuntu , 20.04, 3002.6, 3] # ubun-20.0-3002.6-py3
Expand Down Expand Up @@ -466,10 +473,6 @@ ssf:
### available; however, a latest version `git`-based image is available so using
### that instead to avoid numerous inconsistencies across the org
### Both issues from this formula and in the rendered files such as `kitchen.yml`
### `3003.0-py3`
- [fedora , 34 , 3003.0, 3] # fedo-34.0-3003.0-py3
- [fedora , 33 , 3003.0, 3] # fedo-33.0-3003.0-py3

### `3002.5-py3`
- [gentoo/stage3, latest, 3002.5, 3] # gent-late-3002.5-py3
- [gentoo/stage3, systemd, 3002.5, 3] # gent-sysd-3002.5-py3
Expand All @@ -495,6 +498,9 @@ ssf:
- [ubuntu , 18.04, 3003.0, 3] # ubun-18.0-3003.0-py3
- [centos , 8 , 3003.0, 3] # cent-08.0-3003.0-py3
- [centos , 7 , 3003.0, 3] # cent-07.0-3003.0-py3
- [fedora , 35 , 3003.0, 3] # fedo-35.0-3003.0-py3
- [fedora , 34 , 3003.0, 3] # fedo-34.0-3003.0-py3
- [fedora , 33 , 3003.0, 3] # fedo-33.0-3003.0-py3
- [fedora , 32 , 3003.0, 3] # fedo-32.0-3003.0-py3
# - [opensuse/leap, 15.3 , 3003.0, 3] # opsu-15.3-3003.0-py3
# - [opensuse/leap, 15.2 , 3003.0, 3] # opsu-15.2-3003.0-py3
Expand Down
2 changes: 1 addition & 1 deletion ssf/files/default/.cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ docker_builder:
name: Test ${INSTANCE}
env:
matrix:
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_commented_includes, semrel_formula, width=6) }}
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_allow_failure, platforms_matrix_commented_includes, semrel_formula, width=6) }}
bundle_install_script: bundle install
verify_script:
{%- for pre_cmd in script_kitchen.pre %}
Expand Down
2 changes: 1 addition & 1 deletion ssf/files/default/.github/workflows/kitchen.vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
fail-fast: false
matrix:
instance:
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_commented_includes, semrel_formula, width=10, use_github_format=True, use_vagrant_platforms=True) }}
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_allow_failure, platforms_matrix_commented_includes, semrel_formula, width=10, use_github_format=True, use_vagrant_platforms=True) }}
{%- raw %}
steps:
- name: 'Check out code'
Expand Down
2 changes: 1 addition & 1 deletion ssf/files/default/.github/workflows/kitchen.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
instance:
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_commented_includes, semrel_formula, width=10, use_github_format=True, use_proxy_platforms_windows=platform) }}
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_allow_failure, platforms_matrix_commented_includes, semrel_formula, width=10, use_github_format=True, use_proxy_platforms_windows=platform) }}
{%- raw %}
steps:
- name: 'Check out code'
Expand Down
2 changes: 1 addition & 1 deletion ssf/files/default/.github/workflows/kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
instance:
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_commented_includes, semrel_formula, width=10, use_github_format=True) }}
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_allow_failure, platforms_matrix_commented_includes, semrel_formula, width=10, use_github_format=True) }}
{%- raw %}
steps:
- name: 'Check out code'
Expand Down
16 changes: 13 additions & 3 deletions ssf/files/default/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ rubocop:
###############################################################################
# Define `test` template
###############################################################################
.test_instance:
.test_instance:{{ ' &test_instance' if platforms_matrix_allow_failure else '' }}
stage: *stage_test
image: *image_dindruby
services: *services_docker_dind
Expand All @@ -148,6 +148,16 @@ rubocop:
# Alternative value to consider: `${CI_JOB_NAME}`
- '{{ script_kitchen.bin }} {{ script_kitchen.cmd }} "${DOCKER_ENV_CI_JOB_NAME}"'

{%- if platforms_matrix_allow_failure %}

###############################################################################
# Define `test` template (`allow_failure: true`)
###############################################################################
.test_instance_failure_permitted:
<<: *test_instance
allow_failure: true
{%- endif %}

{%- if semrel_formula == 'template' %}
# <REMOVEME

Expand Down Expand Up @@ -176,7 +186,7 @@ rubocop:
- 'bundle config set without "${BUNDLE_WITHOUT}"'
- 'bundle install'
script:
- '{{ script_kitchen.bin }} {{ script_kitchen.cmd }} default-debian-10-tiamat-py3'
- '{{ script_kitchen.bin }} {{ script_kitchen.cmd }} default-debian-11-master-py3'
# REMOVEME>
{%- endif %}

Expand All @@ -202,7 +212,7 @@ rubocop:
test-formula-conversion: {extends: '.test_conversion'}
# REMOVEME>
{%- 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) }}
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_allow_failure, platforms_matrix_commented_includes, semrel_formula, width=0, use_gitlab_format=True) }}
{%- endif %}

###############################################################################
Expand Down
4 changes: 2 additions & 2 deletions ssf/files/default/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ jobs:
# Ref: https://github.com/saltstack-formulas/template-formula/issues/118
# Ref: https://github.com/saltstack-formulas/template-formula/issues/121
{%- endif %}
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_commented_includes, semrel_formula, use_new_travis_format=True) }}
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_allow_failure, platforms_matrix_commented_includes, semrel_formula, use_new_travis_format=True) }}
{%- endif %}

{%- if semrel_formula == 'template' %}
Expand All @@ -235,7 +235,7 @@ jobs:
- '[ $(git rev-list HEAD --count) -eq 2 ]'
# Quick visual check that correct files have been updated
- git show --pretty="" --name-status
- bin/kitchen verify default-debian-10-tiamat-py3
- bin/kitchen verify default-debian-11-master-py3
# REMOVEME>
{%- endif %}

Expand Down
19 changes: 10 additions & 9 deletions ssf/files/default/.yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@ ignore: |
extends: '{{ yamllint.extends }}'

# Files to ignore completely
# 1. All YAML files under directory `.cache/`, introduced during the GitLab CI run
# 2. All YAML files under directory `.git/`
# 3. All YAML files under directory `node_modules/`, introduced during the Travis run
# 4. Any SLS files under directory `test/`, which are actually state files
# 5. Any YAML files under directory `.kitchen/`, introduced during local testing
# 6. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
# 1. All YAML files under directory `.bundle/`, introduced if gems are installed locally
# 2. All YAML files under directory `.cache/`, introduced during the CI run
# 3. All YAML files under directory `.git/`
# 4. All YAML files under directory `node_modules/`, introduced during the CI run
# 5. Any SLS files under directory `test/`, which are actually state files
# 6. Any YAML files under directory `.kitchen/`, introduced during local testing
# 7. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
{%- if semrel_formula == 'ssf' %}
# 7. All Jinja templates under `ssf/files/` (result in `yamllint` syntax errors)
# 8. 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
{%- elif semrel_formula == 'mysql' %}
# 7. Any YAML files using Jinja (result in `yamllint` syntax errors)
# 8. Any YAML files using Jinja (result in `yamllint` syntax errors)
{%- elif semrel_formula in ['postgres', 'salt'] %}
# 7. All YAML files heavily reliant on Jinja; these can be tackled in a subsequent PR
# 8. All YAML files heavily reliant on Jinja; these can be tackled in a subsequent PR
{%- endif %}
{%- set yl_ignores = {'ignore':
yamllint.ignore.default +
Expand Down
2 changes: 1 addition & 1 deletion ssf/files/default/kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ image: {{ 'saltimages' if [os, os_ver, salt_ver, py_ver] in saltimages else 'net
{%- endif %}
{#- General for all Salt versions #}
{%- if semrel_formula == 'packages' %}
{%- if [os, os_ver] in [['debian', 10], ['debian', 9]] %}
{%- if os in ['debian'] %}
{%- do prov_cmds.append('- apt-get update') %}
{%- do prov_cmds.append('- apt-get install --reinstall -y udev') %}
{%- do prov_cmds.append('- apt-get install -y snapd') %}
Expand Down
Loading