diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61ae21eb7ab72ff028402bc7a31c49537d6a511b..1d94beaeca10d34e01d149d71f0514b95fb7f1e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,7 +61,11 @@ gitlab-opentofu-image:deploy: entrypoint: [""] variables: RELEASE_IMAGE_NAME: "$CI_REGISTRY_IMAGE/gitlab-opentofu" - RELEASE_SEMVER: "${CI_COMMIT_TAG}+opentofu-${OPENTOFU_VERSION}" + # OCI image tags are not compatible with semver, specifically the build metadata part + # indicated with a `+` sign, see https://github.com/distribution/distribution/issues/1201 + # We use a dash `-` here, instead of the `+`. + # This may be problematic, because it indicates a semver prerelease. + RELEASE_SEMVER: "${CI_COMMIT_TAG}-opentofu${OPENTOFU_VERSION}" before_script: - crane auth login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" script: @@ -77,7 +81,7 @@ gitlab-opentofu-image:latest:deploy: variables: OPENTOFU_VERSION: $LATEST_OPENTOFU_VERSION RELEASE_IMAGE_NAME: "$CI_REGISTRY_IMAGE/gitlab-opentofu" - RELEASE_SEMVER: "${CI_COMMIT_TAG}+opentofu" + RELEASE_SEMVER: "${CI_COMMIT_TAG}-opentofu" before_script: - crane auth login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" script: diff --git a/templates/full-pipeline.yml b/templates/full-pipeline.yml index 0771ad333862de89a09644c13ea32223f601a0ed..9a936a5e63b3e18c118ea89a2e9c61c915e0da7b 100644 --- a/templates/full-pipeline.yml +++ b/templates/full-pipeline.yml @@ -27,7 +27,10 @@ spec: # Images gitlab_opentofu_image: - default: '$CI_REGISTRY/components/opentofu/gitlab-opentofu-$[[ inputs.opentofu_version ]]' + # FIXME: This should reference the component tag that is used. + # Currently, blocked by https://gitlab.com/gitlab-org/gitlab/-/issues/438275 + # default: '$CI_REGISTRY/components/opentofu/gitlab-opentofu:$[[ inputs.opentofu_version ]]' + default: '$CI_REGISTRY/components/opentofu/gitlab-opentofu:latest' description: 'Image name of the gitlab-opentofu image' # Configuration