Adding release stage triggered by existence of a tag that matches the v+semver format
This commit is contained in:
parent
8a287d13ef
commit
9fc114c21d
@ -7,6 +7,7 @@ variables:
|
||||
stages:
|
||||
- test
|
||||
- build_packages
|
||||
- release
|
||||
- distribute
|
||||
|
||||
#before_script:
|
||||
@ -51,6 +52,8 @@ delete_test_machine:
|
||||
|
||||
create_build_machines:
|
||||
stage: build_packages
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||
only:
|
||||
- stable
|
||||
tags:
|
||||
@ -62,6 +65,8 @@ create_build_machines:
|
||||
|
||||
package_amd64_deb:
|
||||
stage: build_packages
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||
only:
|
||||
- stable
|
||||
needs:
|
||||
@ -75,6 +80,8 @@ package_amd64_deb:
|
||||
|
||||
package_arm64_deb:
|
||||
stage: build_packages
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||
only:
|
||||
- stable
|
||||
needs:
|
||||
@ -88,6 +95,8 @@ package_arm64_deb:
|
||||
|
||||
package_amd64_rpm:
|
||||
stage: build_packages
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||
only:
|
||||
- stable
|
||||
needs:
|
||||
@ -99,8 +108,21 @@ package_amd64_rpm:
|
||||
- earthly +package-linux-amd64-rpm
|
||||
- /home/gitlab-runner/scp-to-orchestrator.sh
|
||||
|
||||
release_job:
|
||||
stage: release
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/' # Run this job when a tag is created
|
||||
script:
|
||||
- echo "running release_job"
|
||||
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
|
||||
tag_name: '$CI_COMMIT_TAG'
|
||||
description: '$CI_COMMIT_TAG'
|
||||
|
||||
build_repositories:
|
||||
stage: distribute
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||
only:
|
||||
- stable
|
||||
tags:
|
||||
@ -110,6 +132,8 @@ build_repositories:
|
||||
|
||||
deploy_repos:
|
||||
stage: distribute
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||
only:
|
||||
- stable
|
||||
needs:
|
||||
@ -121,6 +145,8 @@ deploy_repos:
|
||||
|
||||
delete_build_machines:
|
||||
stage: distribute
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||
only:
|
||||
- stable
|
||||
tags:
|
||||
|
Loading…
Reference in New Issue
Block a user