Skip to content
Snippets Groups Projects
Commit 9a91b51b authored by Matt Kasa's avatar Matt Kasa
Browse files

fix: Update stable:latest tag based on STABLE_VERSION

parent be8f6adf
No related branches found
No related tags found
No related merge requests found
variables: variables:
STABLE_VERSION: "0.12"
STABLE_IMAGE_NAME: "$CI_REGISTRY_IMAGE/stable:latest"
BUILD_IMAGE_NAME: "$CI_REGISTRY_IMAGE/branches/$CI_COMMIT_REF_SLUG-$TERRAFORM_VERSION:$CI_COMMIT_SHA" BUILD_IMAGE_NAME: "$CI_REGISTRY_IMAGE/branches/$CI_COMMIT_REF_SLUG-$TERRAFORM_VERSION:$CI_COMMIT_SHA"
RELEASE_IMAGE_NAME: "$CI_REGISTRY_IMAGE/releases/$TERRAFORM_VERSION" RELEASE_IMAGE_NAME: "$CI_REGISTRY_IMAGE/releases/$TERRAFORM_VERSION"
TF_ADDRESS: "$CI_API_V4_URL/projects/$CI_PROJECT_ID/terraform/state/$CI_JOB_ID" TF_ADDRESS: "$CI_API_V4_URL/projects/$CI_PROJECT_ID/terraform/state/$CI_JOB_ID"
...@@ -48,6 +50,8 @@ stages: ...@@ -48,6 +50,8 @@ stages:
- docker image tag "$BUILD_IMAGE_NAME" "$RELEASE_IMAGE_NAME:$CI_COMMIT_TAG" - docker image tag "$BUILD_IMAGE_NAME" "$RELEASE_IMAGE_NAME:$CI_COMMIT_TAG"
- docker image push "$RELEASE_IMAGE_NAME:latest" - docker image push "$RELEASE_IMAGE_NAME:latest"
- docker image push "$RELEASE_IMAGE_NAME:$CI_COMMIT_TAG" - docker image push "$RELEASE_IMAGE_NAME:$CI_COMMIT_TAG"
- if [ "$TERRAFORM_VERSION" = "$STABLE_VERSION" ]; then docker image tag "$BUILD_IMAGE_NAME" "$STABLE_IMAGE_NAME"; fi
- if [ "$TERRAFORM_VERSION" = "$STABLE_VERSION" ]; then docker image push "$STABLE_IMAGE_NAME"; fi
only: only:
- tags - tags
......
...@@ -22,3 +22,11 @@ an empty commit sumarizing your changes like so: ...@@ -22,3 +22,11 @@ an empty commit sumarizing your changes like so:
``` ```
git commit --allow-empty -m '[BREAKING CHANGE|feat|fix]: <changelog summary message git commit --allow-empty -m '[BREAKING CHANGE|feat|fix]: <changelog summary message
### Stable tag
This project updates a `stable:latest` tag in the container registry which
tracks the latest build of the image specified in `STABLE_VERSION` in
`.gitlab-ci.yml`. Simply update this to reflect what version series is
considered stable by upstream and the `stable:latest` tag will be updated
automatically.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment