Update testing matrix to support Debian 11
authorJavier Bértoli <jbertoli@curii.com>
Wed, 4 Aug 2021 10:36:58 +0000 (07:36 -0300)
committerJavier Bértoli <jbertoli@curii.com>
Fri, 19 Nov 2021 10:58:56 +0000 (07:58 -0300)
refs #17949
Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli@curii.com>

.gitlab-ci.yml
.pre-commit-config.yaml [new file with mode: 0644]
kitchen.yml

index 2d4b1fdf105f54f0cc05e8ea16457057744d5439..3274d0f0cd2904bb86698dbac848a4fa92286cdc 100644 (file)
@@ -6,8 +6,8 @@
 ###############################################################################
 .node_anchors:
   # `only` (also used for `except` where applicable)
-  only_branch_master_parent_repo: &only_branch_master_parent_repo
-    - 'master@saltstack-formulas/arvados-formula'
+  only_branch_main_parent_repo: &only_branch_main_parent_repo
+    - 'main@git.arvados.org/arvados-formula'
   # `stage`
   stage_lint: &stage_lint 'lint'
   stage_release: &stage_release 'release'
@@ -48,30 +48,32 @@ variables:
 ###############################################################################
 # `lint` stage: `commitlint`, `pre-commit` & `rubocop` (latest, failure allowed)
 ###############################################################################
-commitlint:
-  stage: *stage_lint
-  image: *image_commitlint
-  script:
-    # Add `upstream` remote to get access to `upstream/master`
-    - 'git remote add upstream
-       https://gitlab.com/saltstack-formulas/arvados-formula.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'
+# Disable commitlint because Arvados does not follow this standard, it has
+# its own, see https://dev.arvados.org/projects/arvados/wiki/Coding_Standards
+# commitlint:
+#   stage: *stage_lint
+#   image: *image_commitlint
+#   script:
+#     # Add `upstream` remote to get access to `upstream/main`
+#     - 'git remote add upstream
+#        https://git.arvados.org/arvados-formula.git'
+#     - 'git fetch --all'
+#     # Set default commit hashes for `--from` and `--to`
+#     - 'export COMMITLINT_FROM="$(git merge-base upstream/main 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}" != "main" ]; 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
@@ -123,102 +125,130 @@ rubocop:
 ## 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`
-# api-debian-10-tiamat-py3: {extends: '.test_instance'}
-# api-debian-9-tiamat-py3: {extends: '.test_instance'}
-# api-ubuntu-2004-tiamat-py3: {extends: '.test_instance'}
-# api-ubuntu-1804-tiamat-py3: {extends: '.test_instance'}
-# api-ubuntu-1604-tiamat-py3: {extends: '.test_instance'}
-# api-centos-8-tiamat-py3: {extends: '.test_instance'}
-# api-centos-7-tiamat-py3: {extends: '.test_instance'}
-# api-amazonlinux-2-tiamat-py3: {extends: '.test_instance'}
-# api-oraclelinux-8-tiamat-py3: {extends: '.test_instance'}
-# api-oraclelinux-7-tiamat-py3: {extends: '.test_instance'}
-api-debian-10-master-py3: {extends: '.test_instance'}
-workbench-debian-10-master-py3: {extends: '.test_instance'}
-# shell-debian-10-master-py3: {extends: '.test_instance'}
-keepstore-debian-10-master-py3: {extends: '.test_instance'}
-# api-debian-9-master-py3: {extends: '.test_instance'}
-# workbench-debian-9-master-py3: {extends: '.test_instance'}
-# shell-debian-9-master-py3: {extends: '.test_instance'}
-# keepstore-debian-9-master-py3: {extends: '.test_instance'}
-# api-ubuntu-2004-master-py3: {extends: '.test_instance'}
-# workbench-ubuntu-2004-master-py3: {extends: '.test_instance'}
-# shell-ubuntu-2004-master-py3: {extends: '.test_instance'}
-# keepstore-ubuntu-2004-master-py3: {extends: '.test_instance'}
-api-ubuntu-1804-master-py3: {extends: '.test_instance'}
-workbench-ubuntu-1804-master-py3: {extends: '.test_instance'}
-# shell-ubuntu-1804-master-py3: {extends: '.test_instance'}
-# keepstore-ubuntu-1804-master-py3: {extends: '.test_instance'}
-# api-ubuntu-1604-master-py3: {extends: '.test_instance'}
-# workbench-ubuntu-1604-master-py3: {extends: '.test_instance'}
-# shell-ubuntu-1604-master-py3: {extends: '.test_instance'}
-# keepstore-ubuntu-1604-master-py3: {extends: '.test_instance'}
-# api-centos-8-master-py3: {extends: '.test_instance'}
-# workbench-centos-8-master-py3: {extends: '.test_instance'}
-# shell-centos-8-master-py3: {extends: '.test_instance'}
-# keepstore-centos-8-master-py3: {extends: '.test_instance'}
-# api-centos-7-master-py3: {extends: '.test_instance'}
-# workbench-centos-7-master-py3: {extends: '.test_instance'}
-shell-centos-7-master-py3: {extends: '.test_instance'}
-keepstore-centos-7-master-py3: {extends: '.test_instance'}
-# api-amazonlinux-2-master-py3: {extends: '.test_instance'}
-# workbench-amazonlinux-2-master-py3: {extends: '.test_instance'}
-# shell-amazonlinux-2-master-py3: {extends: '.test_instance'}
-# keepstore-amazonlinux-2-master-py3: {extends: '.test_instance'}
-# api-oraclelinux-8-master-py3: {extends: '.test_instance'}
-# workbench-oraclelinux-8-master-py3: {extends: '.test_instance'}
-# shell-oraclelinux-8-master-py3: {extends: '.test_instance'}
-# keepstore-oraclelinux-8-master-py3: {extends: '.test_instance'}
-# api-oraclelinux-7-master-py3: {extends: '.test_instance'}
-# workbench-oraclelinux-7-master-py3: {extends: '.test_instance'}
-# shell-oraclelinux-7-master-py3: {extends: '.test_instance'}
-# keepstore-oraclelinux-7-master-py3: {extends: '.test_instance'}
-# api-debian-10-3003-0-py3: {extends: '.test_instance'}
-# api-debian-9-3003-0-py3: {extends: '.test_instance'}
-# api-ubuntu-2004-3003-0-py3: {extends: '.test_instance'}
-# api-ubuntu-1804-3003-0-py3: {extends: '.test_instance'}
-# api-centos-8-3003-0-py3: {extends: '.test_instance'}
-# api-centos-7-3003-0-py3: {extends: '.test_instance'}
-# api-amazonlinux-2-3003-0-py3: {extends: '.test_instance'}
-# api-oraclelinux-8-3003-0-py3: {extends: '.test_instance'}
-# api-oraclelinux-7-3003-0-py3: {extends: '.test_instance'}
-# api-debian-10-3002-6-py3: {extends: '.test_instance'}
-# api-debian-9-3002-6-py3: {extends: '.test_instance'}
-# api-ubuntu-2004-3002-6-py3: {extends: '.test_instance'}
-# api-ubuntu-1804-3002-6-py3: {extends: '.test_instance'}
-# api-ubuntu-1604-3002-6-py3: {extends: '.test_instance'}
-# api-centos-8-3002-6-py3: {extends: '.test_instance'}
-# api-centos-7-3002-6-py3: {extends: '.test_instance'}
-# api-amazonlinux-2-3002-6-py3: {extends: '.test_instance'}
-# api-oraclelinux-8-3002-6-py3: {extends: '.test_instance'}
-# api-oraclelinux-7-3002-6-py3: {extends: '.test_instance'}
-# api-debian-10-3001-7-py3: {extends: '.test_instance'}
-# api-debian-9-3001-7-py3: {extends: '.test_instance'}
-# api-ubuntu-2004-3001-7-py3: {extends: '.test_instance'}
-# api-ubuntu-1804-3001-7-py3: {extends: '.test_instance'}
-# api-ubuntu-1604-3001-7-py3: {extends: '.test_instance'}
-# api-centos-8-3001-7-py3: {extends: '.test_instance'}
-# api-centos-7-3001-7-py3: {extends: '.test_instance'}
-# api-amazonlinux-2-3001-7-py3: {extends: '.test_instance'}
-# api-oraclelinux-8-3001-7-py3: {extends: '.test_instance'}
-# api-oraclelinux-7-3001-7-py3: {extends: '.test_instance'}
-# api-debian-10-3000-9-py3: {extends: '.test_instance'}
-# api-debian-9-3000-9-py3: {extends: '.test_instance'}
-# api-ubuntu-1804-3000-9-py3: {extends: '.test_instance'}
-# api-ubuntu-1604-3000-9-py3: {extends: '.test_instance'}
-# api-centos-8-3000-9-py3: {extends: '.test_instance'}
-# api-centos-7-3000-9-py3: {extends: '.test_instance'}
-# api-amazonlinux-2-3000-9-py3: {extends: '.test_instance'}
-# api-oraclelinux-8-3000-9-py3: {extends: '.test_instance'}
-# api-oraclelinux-7-3000-9-py3: {extends: '.test_instance'}
-# api-ubuntu-1804-3000-9-py2: {extends: '.test_instance'}
-# api-ubuntu-1604-3000-9-py2: {extends: '.test_instance'}
+# Get this list with
+# kitchen list |awk '{print $1": {extends: '.test_instance'}"}' |sort -r
+
+workbench-ubuntu-2004-tiamat-py3: {extends: .test_instance}
+# workbench-ubuntu-2004-master-py3: {extends: .test_instance}
+# workbench-ubuntu-2004-3003-1-py3: {extends: .test_instance}
+# workbench-ubuntu-2004-3002-6-py3: {extends: .test_instance}
+# workbench-ubuntu-2004-3001-7-py3: {extends: .test_instance}
+# workbench-ubuntu-1804-tiamat-py3: {extends: .test_instance}
+workbench-ubuntu-1804-master-py3: {extends: .test_instance}
+# workbench-ubuntu-1804-3003-1-py3: {extends: .test_instance}
+# workbench-ubuntu-1804-3002-6-py3: {extends: .test_instance}
+# workbench-ubuntu-1804-3001-7-py3: {extends: .test_instance}
+# workbench-ubuntu-1804-3000-9-py3: {extends: .test_instance}
+# workbench-ubuntu-1804-3000-9-py2: {extends: .test_instance}
+# workbench-debian-11-tiamat-py3: {extends: .test_instance}
+# workbench-debian-11-master-py3: {extends: .test_instance}
+workbench-debian-11-3003-1-py3: {extends: .test_instance}
+# workbench-debian-11-3002-6-py3: {extends: .test_instance}
+# workbench-debian-10-tiamat-py3: {extends: .test_instance}
+# workbench-debian-10-master-py3: {extends: .test_instance}
+# workbench-debian-10-3003-1-py3: {extends: .test_instance}
+workbench-debian-10-3002-6-py3: {extends: .test_instance}
+# workbench-debian-10-3001-7-py3: {extends: .test_instance}
+# workbench-debian-10-3000-9-py3: {extends: .test_instance}
+# workbench-centos-7-tiamat-py3: {extends: .test_instance}
+# workbench-centos-7-master-py3: {extends: .test_instance}
+# workbench-centos-7-3003-1-py3: {extends: .test_instance}
+# workbench-centos-7-3002-6-py3: {extends: .test_instance}
+workbench-centos-7-3001-7-py3: {extends: .test_instance}
+# workbench-centos-7-3000-9-py3: {extends: .test_instance}
+
+# shell-ubuntu-2004-tiamat-py3: {extends: .test_instance}
+shell-ubuntu-2004-master-py3: {extends: .test_instance}
+# shell-ubuntu-2004-3003-1-py3: {extends: .test_instance}
+# shell-ubuntu-2004-3002-6-py3: {extends: .test_instance}
+# shell-ubuntu-2004-3001-7-py3: {extends: .test_instance}
+# shell-ubuntu-1804-tiamat-py3: {extends: .test_instance}
+# shell-ubuntu-1804-master-py3: {extends: .test_instance}
+shell-ubuntu-1804-3003-1-py3: {extends: .test_instance}
+# shell-ubuntu-1804-3002-6-py3: {extends: .test_instance}
+# shell-ubuntu-1804-3001-7-py3: {extends: .test_instance}
+# shell-ubuntu-1804-3000-9-py3: {extends: .test_instance}
+# shell-ubuntu-1804-3000-9-py2: {extends: .test_instance}
+# shell-debian-11-tiamat-py3: {extends: .test_instance}
+# shell-debian-11-master-py3: {extends: .test_instance}
+# shell-debian-11-3003-1-py3: {extends: .test_instance}
+shell-debian-11-3002-6-py3: {extends: .test_instance}
+# shell-debian-10-tiamat-py3: {extends: .test_instance}
+# shell-debian-10-master-py3: {extends: .test_instance}
+# shell-debian-10-3003-1-py3: {extends: .test_instance}
+# shell-debian-10-3002-6-py3: {extends: .test_instance}
+shell-debian-10-3001-7-py3: {extends: .test_instance}
+# shell-debian-10-3000-9-py3: {extends: .test_instance}
+shell-centos-7-tiamat-py3: {extends: .test_instance}
+# shell-centos-7-master-py3: {extends: .test_instance}
+# shell-centos-7-3003-1-py3: {extends: .test_instance}
+# shell-centos-7-3002-6-py3: {extends: .test_instance}
+# shell-centos-7-3001-7-py3: {extends: .test_instance}
+# shell-centos-7-3000-9-py3: {extends: .test_instance}
+
+# keepstore-ubuntu-2004-tiamat-py3: {extends: .test_instance}
+# keepstore-ubuntu-2004-master-py3: {extends: .test_instance}
+keepstore-ubuntu-2004-3003-1-py3: {extends: .test_instance}
+# keepstore-ubuntu-2004-3002-6-py3: {extends: .test_instance}
+# keepstore-ubuntu-2004-3001-7-py3: {extends: .test_instance}
+# keepstore-ubuntu-1804-tiamat-py3: {extends: .test_instance}
+# keepstore-ubuntu-1804-master-py3: {extends: .test_instance}
+# keepstore-ubuntu-1804-3003-1-py3: {extends: .test_instance}
+keepstore-ubuntu-1804-3002-6-py3: {extends: .test_instance}
+# keepstore-ubuntu-1804-3001-7-py3: {extends: .test_instance}
+# keepstore-ubuntu-1804-3000-9-py3: {extends: .test_instance}
+# keepstore-ubuntu-1804-3000-9-py2: {extends: .test_instance}
+keepstore-debian-11-tiamat-py3: {extends: .test_instance}
+# keepstore-debian-11-master-py3: {extends: .test_instance}
+# keepstore-debian-11-3003-1-py3: {extends: .test_instance}
+# keepstore-debian-11-3002-6-py3: {extends: .test_instance}
+# keepstore-debian-10-tiamat-py3: {extends: .test_instance}
+# keepstore-debian-10-master-py3: {extends: .test_instance}
+# keepstore-debian-10-3003-1-py3: {extends: .test_instance}
+# keepstore-debian-10-3002-6-py3: {extends: .test_instance}
+keepstore-debian-10-3001-7-py3: {extends: .test_instance}
+# keepstore-debian-10-3000-9-py3: {extends: .test_instance}
+# keepstore-centos-7-tiamat-py3: {extends: .test_instance}
+# keepstore-centos-7-master-py3: {extends: .test_instance}
+# keepstore-centos-7-3003-1-py3: {extends: .test_instance}
+# keepstore-centos-7-3002-6-py3: {extends: .test_instance}
+# keepstore-centos-7-3001-7-py3: {extends: .test_instance}
+keepstore-centos-7-3000-9-py3: {extends: .test_instance}
+
+# api-ubuntu-2004-tiamat-py3: {extends: .test_instance}
+# api-ubuntu-2004-master-py3: {extends: .test_instance}
+# api-ubuntu-2004-3003-1-py3: {extends: .test_instance}
+api-ubuntu-2004-3002-6-py3: {extends: .test_instance}
+# api-ubuntu-2004-3001-7-py3: {extends: .test_instance}
+# api-ubuntu-1804-tiamat-py3: {extends: .test_instance}
+# api-ubuntu-1804-master-py3: {extends: .test_instance}
+# api-ubuntu-1804-3003-1-py3: {extends: .test_instance}
+# api-ubuntu-1804-3002-6-py3: {extends: .test_instance}
+api-ubuntu-1804-3001-7-py3: {extends: .test_instance}
+# api-ubuntu-1804-3000-9-py3: {extends: .test_instance}
+# api-ubuntu-1804-3000-9-py2: {extends: .test_instance}
+# api-debian-11-tiamat-py3: {extends: .test_instance}
+# api-debian-11-master-py3: {extends: .test_instance}
+api-debian-11-3003-1-py3: {extends: .test_instance}
+# api-debian-11-3002-6-py3: {extends: .test_instance}
+# api-debian-10-tiamat-py3: {extends: .test_instance}
+# api-debian-10-master-py3: {extends: .test_instance}
+# api-debian-10-3003-1-py3: {extends: .test_instance}
+# api-debian-10-3002-6-py3: {extends: .test_instance}
+# api-debian-10-3001-7-py3: {extends: .test_instance}
+api-debian-10-3000-9-py3: {extends: .test_instance}
+api-centos-7-tiamat-py3: {extends: .test_instance}
+# api-centos-7-master-py3: {extends: .test_instance}
+# api-centos-7-3003-1-py3: {extends: .test_instance}
+# api-centos-7-3002-6-py3: {extends: .test_instance}
+# api-centos-7-3001-7-py3: {extends: .test_instance}
+# api-centos-7-3000-9-py3: {extends: .test_instance}
 
 ###############################################################################
 # `release` stage: `semantic-release`
 ###############################################################################
 semantic-release:
-  only: *only_branch_master_parent_repo
+  only: *only_branch_main_parent_repo
   stage: *stage_release
   image: *image_semanticrelease
   variables:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644 (file)
index 0000000..74381e2
--- /dev/null
@@ -0,0 +1,55 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
+---
+# See https://pre-commit.com for more information
+# See https://pre-commit.com/hooks.html for more hooks
+default_stages: [commit]
+repos:
+  - repo: https://github.com/rubocop-hq/rubocop
+    rev: v1.9.1
+    hooks:
+      - id: rubocop
+        name: Check Ruby files with rubocop
+        args: [--debug]
+        always_run: true
+        pass_filenames: false
+  - repo: https://github.com/shellcheck-py/shellcheck-py
+    rev: v0.7.1.1
+    hooks:
+      - id: shellcheck
+        name: Check shell scripts with shellcheck
+        files: ^.*\.(sh|bash|ksh)$
+        types: []
+  - repo: https://github.com/adrienverge/yamllint
+    rev: v1.23.0
+    hooks:
+      - id: yamllint
+        name: Check YAML syntax with yamllint
+        args: [--strict, '.']
+        always_run: true
+        pass_filenames: false
+  - repo: https://github.com/warpnet/salt-lint
+    rev: v0.3.0
+    hooks:
+      - id: salt-lint
+        name: Check Salt files using salt-lint
+        files: ^.*\.(sls|jinja|j2|tmpl|tst)$
+  - repo: https://github.com/myint/rstcheck
+    rev: 3f929574
+    hooks:
+      - id: rstcheck
+        name: Check reST files using rstcheck
+        exclude: 'docs/CHANGELOG.rst'
+  - repo: https://github.com/saltstack-formulas/mirrors-rst-lint
+    rev: v1.3.2
+    hooks:
+      - id: rst-lint
+        name: Check reST files using rst-lint
+        exclude: |
+            (?x)^(
+                docs/CHANGELOG.rst|
+                docs/TOFS_pattern.rst|
+                docs/CONTRIBUTING_DOCS.rst|
+                docs/index.rst|
+            )$
+        additional_dependencies: [pygments==2.9.0]
index 8c1086d5a5c78fff2edcae1bb7a820bb2fbd6d6f..4e38bb836199412efcaaf6e1383300140594c921 100644 (file)
@@ -24,6 +24,9 @@ provisioner:
 
 platforms:
   ## SALT `tiamat`
+  - name: debian-11-tiamat-py3
+    driver:
+      image: saltimages/salt-tiamat-py3:debian-11
   - name: debian-10-tiamat-py3
     driver:
       image: saltimages/salt-tiamat-py3:debian-10
@@ -38,6 +41,9 @@ platforms:
       image: saltimages/salt-tiamat-py3:centos-7
 
   ## SALT `master`
+  - name: debian-11-master-py3
+    driver:
+      image: saltimages/salt-master-py3:debian-11
   - name: debian-10-master-py3
     driver:
       image: saltimages/salt-master-py3:debian-10
@@ -52,6 +58,9 @@ platforms:
       image: saltimages/salt-master-py3:centos-7
 
   ## SALT `3003.1`
+  - name: debian-11-3003-1-py3
+    driver:
+      image: saltimages/salt-3003.1-py3:debian-11
   - name: debian-10-3003-1-py3
     driver:
       image: saltimages/salt-3003.1-py3:debian-10
@@ -66,6 +75,9 @@ platforms:
       image: saltimages/salt-3003.1-py3:centos-7
 
   ## SALT `3002.6`
+  - name: debian-11-3002-6-py3
+    driver:
+      image: saltimages/salt-3002.6-py3:debian-11
   - name: debian-10-3002-6-py3
     driver:
       image: saltimages/salt-3002.6-py3:debian-10