Chore: switch to simpler configuration
This commit is contained in:
@@ -1,32 +1,12 @@
|
|||||||
prepare_job:
|
|
||||||
stage: build # This stage must run before the release stage
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
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 "EXTRA_DESCRIPTION=some message" >> variables.env # Generate the EXTRA_DESCRIPTION and TAG environment variables
|
|
||||||
- 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:
|
release_job:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
needs:
|
|
||||||
- job: prepare_job
|
|
||||||
artifacts: true
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_TAG
|
- if: $CI_COMMIT_TAG # Run this job when a tag is created manually
|
||||||
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:
|
script:
|
||||||
- echo 'running release_job for $TAG'
|
- echo 'running release_job'
|
||||||
release:
|
release:
|
||||||
name: 'Release $TAG'
|
name: 'Release $CI_COMMIT_TAG'
|
||||||
description: 'Created using the release-cli $EXTRA_DESCRIPTION' # $EXTRA_DESCRIPTION and the $TAG
|
description: 'Created using the release-cli $EXTRA_DESCRIPTION' # $EXTRA_DESCRIPTION must be defined
|
||||||
tag_name: '$TAG' # variables must be defined elsewhere
|
tag_name: '$CI_COMMIT_TAG' # elsewhere in the pipeline.
|
||||||
ref: '$CI_COMMIT_SHA' # in the pipeline. For example, in the
|
ref: '$CI_COMMIT_TAG'
|
||||||
Reference in New Issue
Block a user