feat(docker): tag images based on release cycle
We want to tag images based on the different steps of the release cycle: - `dev` images where developpement is integrated - `testing` images where releases are stabilised - `stable` images when the release is done - `major` tag with only the first digit of the semantic version, this tag will always point to the latest release of the major version - `minor` tag with only the first 2 digits of the semantic version, this tag will always point to the latest release of the minor version - `release` tag with the full semantic version - `latest`/`stable` point to the latest stable image Define `.tag-docker-image` template used by `*-docker-tag` jobs It tag the `${IMAGE_NAME}:${SOURCE_TAG}` with the tag `${IMAGE_TAG}` USAGE ===== foo-docker-tag-devel: extends: .tag-docker-image variables: IMAGE_TAG: 'devel' REQUIREMENTS ============ - A `release` stage must be present in your pipeline or it must be overriden by the extending job to feet your need. - The `.not-on-stable` rules template OPTIONAL VARIABLES ================== - `IMAGE_NAME`: defaults to `${CI_JOB_NAME}` with any suffix `-docker-tag*` removed - `SOURCE_TAG`: source image tag to retag, defaults to `git-${CI_COMMIT_SHORT_SHA}` - `IMAGE_TAG`: image tag, defaults to `${CI_COMMIT_TAG}` with prefix `RELEASE_PREFIX` removed - `RELEASE_PREFIX`: prefix of the `RELEASE`, defaults to `release/` USED CI VARIABLES ================= - `CI_REGISTRY` - `CI_REGISTRY_USER` - `CI_REGISTRY_PASSWORD` - `CI_REGISTRY_IMAGE`
Loading
Please register or sign in to comment