Adding release stage triggered by existence of a tag that matches the v+semver format
This commit is contained in:
parent
9fc114c21d
commit
f0f6031843
@ -52,23 +52,17 @@ delete_test_machine:
|
|||||||
|
|
||||||
create_build_machines:
|
create_build_machines:
|
||||||
stage: build_packages
|
stage: build_packages
|
||||||
rules:
|
|
||||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
|
||||||
only:
|
|
||||||
- stable
|
|
||||||
tags:
|
tags:
|
||||||
- build-orchestration
|
- build-orchestration
|
||||||
script:
|
script:
|
||||||
- /home/gitlab-runner/build-machine-ctl.sh create amd64-deb
|
- /home/gitlab-runner/build-machine-ctl.sh create amd64-deb
|
||||||
- /home/gitlab-runner/build-machine-ctl.sh create arm64-deb
|
- /home/gitlab-runner/build-machine-ctl.sh create arm64-deb
|
||||||
- /home/gitlab-runner/build-machine-ctl.sh create amd64-rpm
|
- /home/gitlab-runner/build-machine-ctl.sh create amd64-rpm
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == "main" && $CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||||
|
|
||||||
package_amd64_deb:
|
package_amd64_deb:
|
||||||
stage: build_packages
|
stage: build_packages
|
||||||
rules:
|
|
||||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
|
||||||
only:
|
|
||||||
- stable
|
|
||||||
needs:
|
needs:
|
||||||
- create_build_machines
|
- create_build_machines
|
||||||
tags:
|
tags:
|
||||||
@ -77,13 +71,11 @@ package_amd64_deb:
|
|||||||
- earthly bootstrap
|
- earthly bootstrap
|
||||||
- earthly +package-linux-amd64-deb
|
- earthly +package-linux-amd64-deb
|
||||||
- /home/gitlab-runner/scp-to-orchestrator.sh
|
- /home/gitlab-runner/scp-to-orchestrator.sh
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == "main" && $CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||||
|
|
||||||
package_arm64_deb:
|
package_arm64_deb:
|
||||||
stage: build_packages
|
stage: build_packages
|
||||||
rules:
|
|
||||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
|
||||||
only:
|
|
||||||
- stable
|
|
||||||
needs:
|
needs:
|
||||||
- create_build_machines
|
- create_build_machines
|
||||||
tags:
|
tags:
|
||||||
@ -92,13 +84,11 @@ package_arm64_deb:
|
|||||||
- earthly bootstrap
|
- earthly bootstrap
|
||||||
- earthly +package-linux-arm64-deb
|
- earthly +package-linux-arm64-deb
|
||||||
- /home/gitlab-runner/scp-to-orchestrator.sh
|
- /home/gitlab-runner/scp-to-orchestrator.sh
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == "main" && $CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||||
|
|
||||||
package_amd64_rpm:
|
package_amd64_rpm:
|
||||||
stage: build_packages
|
stage: build_packages
|
||||||
rules:
|
|
||||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
|
||||||
only:
|
|
||||||
- stable
|
|
||||||
needs:
|
needs:
|
||||||
- create_build_machines
|
- create_build_machines
|
||||||
tags:
|
tags:
|
||||||
@ -107,51 +97,47 @@ package_amd64_rpm:
|
|||||||
- earthly bootstrap
|
- earthly bootstrap
|
||||||
- earthly +package-linux-amd64-rpm
|
- earthly +package-linux-amd64-rpm
|
||||||
- /home/gitlab-runner/scp-to-orchestrator.sh
|
- /home/gitlab-runner/scp-to-orchestrator.sh
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == "main" && $CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||||
|
|
||||||
release_job:
|
release_job:
|
||||||
stage: release
|
stage: release
|
||||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
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:
|
script:
|
||||||
- echo "running release_job"
|
- echo "running release_job"
|
||||||
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
|
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
|
||||||
tag_name: '$CI_COMMIT_TAG'
|
tag_name: '$CI_COMMIT_TAG'
|
||||||
description: '$CI_COMMIT_TAG'
|
description: '$CI_COMMIT_TAG'
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == "main" && $CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||||
|
|
||||||
build_repositories:
|
build_repositories:
|
||||||
stage: distribute
|
stage: distribute
|
||||||
rules:
|
|
||||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
|
||||||
only:
|
|
||||||
- stable
|
|
||||||
tags:
|
tags:
|
||||||
- build-orchestration
|
- build-orchestration
|
||||||
script:
|
script:
|
||||||
- /home/gitlab-runner/distribute-packages.sh
|
- /home/gitlab-runner/distribute-packages.sh
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == "main" && $CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||||
|
|
||||||
deploy_repos:
|
deploy_repos:
|
||||||
stage: distribute
|
stage: distribute
|
||||||
rules:
|
|
||||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
|
||||||
only:
|
|
||||||
- stable
|
|
||||||
needs:
|
needs:
|
||||||
- build_repositories
|
- build_repositories
|
||||||
tags:
|
tags:
|
||||||
- repo-server
|
- repo-server
|
||||||
script:
|
script:
|
||||||
- /home/gitlab-runner/deploy-repo.sh
|
- /home/gitlab-runner/deploy-repo.sh
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == "main" && $CI_COMMIT_BRANCH =~ /v\d.+/'
|
||||||
|
|
||||||
delete_build_machines:
|
delete_build_machines:
|
||||||
stage: distribute
|
stage: distribute
|
||||||
rules:
|
|
||||||
- if: '$CI_COMMIT_BRANCH =~ /v\d.+/'
|
|
||||||
only:
|
|
||||||
- stable
|
|
||||||
tags:
|
tags:
|
||||||
- build-orchestration
|
- build-orchestration
|
||||||
script:
|
script:
|
||||||
- /home/gitlab-runner/build-machine-ctl.sh delete amd64-deb
|
- /home/gitlab-runner/build-machine-ctl.sh delete amd64-deb
|
||||||
- /home/gitlab-runner/build-machine-ctl.sh delete arm64-deb
|
- /home/gitlab-runner/build-machine-ctl.sh delete arm64-deb
|
||||||
- /home/gitlab-runner/build-machine-ctl.sh delete amd64-rpm
|
- /home/gitlab-runner/build-machine-ctl.sh delete amd64-rpm
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == "main" && $CI_COMMIT_BRANCH =~ /v\d.+/'
|
Loading…
Reference in New Issue
Block a user