FAQ | This is a LIVE service | Changelog

Skip to content
Commits on Source (6)
......@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.7.0] - 2023-07-31
### Added
- terraform-module: Extend the GitLab Terraform Module to ensure the tag being used to version
the module exists in the CHANGELOG.
## [2.6.2] - 2023-08-01
### Fixed
......
#
# Checks that the provided tag exists in the CHANGELOG as the latest version.
#
check_latest_tag_in_changelog:
stage: test
script:
- changelog_file=""
- if [ -f "CHANGELOG" ]; then
changelog_file="CHANGELOG";
elif [ -f "CHANGELOG.md" ]; then
changelog_file="CHANGELOG.md";
else
echo "No CHANGELOG or CHANGELOG.md file found";
exit 1;
fi
- latest_changelog_version=$(grep -m 1 '^## \[[0-9]\+\.[0-9]\+\.[0-9]\+\(-[a-zA-Z0-9]\+\)\?\]' "$changelog_file" | sed 's/^## \[\(.*\)\] .*/\1/')
- if [ "$latest_changelog_version" = "$CI_COMMIT_TAG" ]; then
echo "Tag $CI_COMMIT_TAG found in $changelog_file";
else
echo "Tag $CI_COMMIT_TAG isn't the latest version in $changelog_file, latest=$latest_changelog_version";
exit 1;
fi
rules:
- if: $CHANGELOG_CHECK_DISABLED
when: never
- if: $CI_COMMIT_TAG
\ No newline at end of file
# Extends the template from GitLab for publishing Terraform modules to the Terraform Module Registry.
#
# Checks that the provided tag exists in the CHANGELOG.
#
# See https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Terraform-Module.gitlab-ci.yml
include:
- template: Terraform-Module.gitlab-ci.yml
- local: '/auto-devops/check-latest-tag-in-changelog.yml'
variables:
TERRAFORM_MODULE_SYSTEM: devops