Skip to content

Instantly share code, notes, and snippets.

@sylvainfaivre
Created April 9, 2025 16:01
Show Gist options
  • Save sylvainfaivre/847f20083226ec2fe050b443556c6a3d to your computer and use it in GitHub Desktop.
Save sylvainfaivre/847f20083226ec2fe050b443556c6a3d to your computer and use it in GitHub Desktop.
How to update CI setup for your salt formula

How to update CI setup for your salt formula

Gemfile and Gemfile.lock

These define gems to use for kitchen, so no customization is needed, you can just copy these files from the template formula if they are outdated in your formula.

kitchen.yml

Check "driver" and "provisioner" section (probably nothing to change).

Upgrade "platforms" section. You can copy and paste the whole thing from the template formula, as you will pick from those to only run some platforms in the gitlab-ci config.

Check "verifier"section (probably nothing to change).

The "suite" section is specific to the formula, no need to edit it.

.gitlab-ci.yml

Check ".node_anchors" section (specially images).

In the "test stage", remove all instances from your current yml file, then select some instances from the template formula and add them.

Refer to the comment in the template formula's .gitlab-ci.yml about picking a few instances.

For example, all of these {Alma, CentOS, Rocky, Oracle} are RHEL based, and Fedora is the upstream, so you will probably be fine if you test only with Fedora and not the other ones.

At the time of writing (2025-04), I suggest testing against Salt images for all 3 branches (master, 3006-10, 3007-1) as they behave differently, due to the great module migration.

Beware : if you defined more than one test suite in kitchen.yml, or named your config suite somehing else than "default", you have to remove the default- prefix from the instance names in .gitlab-ci.yml.

.pre-commit-config.yaml

AFAIK, you can just overwrite the whole file with the one from the template formula.

Check the yamllint files to include / exclude are OK for your formula.

Linter config files

For these files :

  • .rstcheck.cfg
  • .rubocop.yml
  • .salt-lint
  • .yamllint

They may contain specific overrides for your formula, so you will have to check their contents and see if you need to apply updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment