From 9aedc155a9a0a8b54ad188dfec26b12d82821c9f Mon Sep 17 00:00:00 2001 From: Timo Furrer <tfurrer@gitlab.com> Date: Mon, 10 Jun 2024 09:25:01 +0200 Subject: [PATCH] Add docs for versions SSoT --- CONTRIBUTING.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 71f1346..b76bce3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,16 +9,19 @@ from [`.gitlab/README.md.template`](.gitlab/README.md.template). ## Upgrade OpenTofu versions -When adding new OpenTofu versions the following places need to be updated: - -| File | What | -| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------- | -| [`templates/full-pipeline.yml`](templates/full-pipeline.yml) | The `default` value and `options` list of the `sepc.inputs.opentofu_versions` entry. | -| [`.gitlab-ci.yml`](.gitlab-ci.yml) | The `.opentofu_versions.parallel.matrix` list and the `LATEST_OPENTOFU_VERSION` variable. | - -All of the above definitions have to match each other. -We currently need to change it in multiple places, because there is not a good way to share information -from the templates and the components pipeline defintion - at least in the features we'd like to use them. +The file `opentofu_versions.yaml` in the root of the project acts as +Single Source of Truth (SSoT) for the OpenTofu versions currently supported. +The versions in the templates are rendered by the +`./.gitlab/scripts/update-opentofu-versions.sh` script and the versions in +the `.gitlab-ci.yml` file are referencing the data from the SSoT file by +using a combination of CI includes and `!reference`. + +To update the supported OpenTofu versions perform the following steps: + +- Update the SSoT file with the new latest version and supported versions. +- Run the `./.gitlab/scripts/update-opentofu-versions.sh` script. +- Commit the changes. +- Submit Merge Request. ## Releasing -- GitLab