This commit is contained in:
Heiko Reese
2022-02-21 08:35:14 +01:00
parent 1c84639ac7
commit c6c6ba23fd

View File

@ -1,6 +1,7 @@
stages: stages:
- build - build
- debian-package - debian-package
- release
.image-buster: .image-buster:
image: '${CONTAINER_REGISTRY_NAME}/exim-encrypt-dlfunc-build-buster' image: '${CONTAINER_REGISTRY_NAME}/exim-encrypt-dlfunc-build-buster'
@ -113,3 +114,28 @@ debian-package:buster:
dependencies: dependencies:
- build:buster - build:buster
needs: [ "build:buster" ] needs: [ "build:buster" ]
prepare_job:
stage: prepare # This stage must run before the release stage
rules:
- if: $CI_COMMIT_TAG
when: never # Do not run this job when a tag is created manually
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch
script:
- echo "TAG=v$(cat VERSION)" >> variables.env # and append to the variables.env file
artifacts:
reports:
dotenv: variables.env # Use artifacts:reports:dotenv to expose the variables to other jobs
release_job:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG # Run this job when a tag is created manually
script:
- echo "running release_job"
release:
name: 'Release $CI_COMMIT_TAG'
description: 'Created using the release-cli'
tag_name: '$CI_COMMIT_TAG'
ref: '$CI_COMMIT_TAG'