mirror of
https://gitlab.kit.edu/kit/scc/sys/mail/exim-encrypt-dlfunc.git
synced 2025-12-06 12:13:57 +01:00
CI: Added release stage (mosty copied from https://docs.gitlab.com/ee/user/project/releases/#cicd-example-of-the-release-keyword)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
stages:
|
||||
- build
|
||||
- debian-package
|
||||
- release
|
||||
|
||||
.image-buster:
|
||||
image: '${CONTAINER_REGISTRY_NAME}/exim-encrypt-dlfunc-build-buster'
|
||||
@ -113,3 +114,28 @@ debian-package:buster:
|
||||
dependencies:
|
||||
- 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'
|
||||
|
||||
Reference in New Issue
Block a user