Adding release stage triggered by existence of a tag that matches the v+semver format
This commit is contained in:
		| @@ -7,6 +7,7 @@ variables: | |||||||
| stages: | stages: | ||||||
|   - test |   - test | ||||||
|   - build_packages |   - build_packages | ||||||
|  |   - release | ||||||
|   - distribute |   - distribute | ||||||
|  |  | ||||||
| #before_script: | #before_script: | ||||||
| @@ -51,6 +52,8 @@ delete_test_machine: | |||||||
|  |  | ||||||
| create_build_machines: | create_build_machines: | ||||||
|   stage: build_packages |   stage: build_packages | ||||||
|  |   rules: | ||||||
|  |     - if: '$CI_COMMIT_BRANCH =~ /v\d.+/' | ||||||
|   only: |   only: | ||||||
|     - stable |     - stable | ||||||
|   tags: |   tags: | ||||||
| @@ -62,6 +65,8 @@ create_build_machines: | |||||||
|  |  | ||||||
| package_amd64_deb: | package_amd64_deb: | ||||||
|   stage: build_packages |   stage: build_packages | ||||||
|  |   rules: | ||||||
|  |     - if: '$CI_COMMIT_BRANCH =~ /v\d.+/' | ||||||
|   only: |   only: | ||||||
|     - stable |     - stable | ||||||
|   needs: |   needs: | ||||||
| @@ -75,6 +80,8 @@ package_amd64_deb: | |||||||
|  |  | ||||||
| package_arm64_deb: | package_arm64_deb: | ||||||
|   stage: build_packages |   stage: build_packages | ||||||
|  |   rules: | ||||||
|  |     - if: '$CI_COMMIT_BRANCH =~ /v\d.+/' | ||||||
|   only: |   only: | ||||||
|     - stable |     - stable | ||||||
|   needs: |   needs: | ||||||
| @@ -88,6 +95,8 @@ package_arm64_deb: | |||||||
|  |  | ||||||
| package_amd64_rpm: | package_amd64_rpm: | ||||||
|   stage: build_packages |   stage: build_packages | ||||||
|  |   rules: | ||||||
|  |     - if: '$CI_COMMIT_BRANCH =~ /v\d.+/' | ||||||
|   only: |   only: | ||||||
|     - stable |     - stable | ||||||
|   needs: |   needs: | ||||||
| @@ -99,8 +108,21 @@ package_amd64_rpm: | |||||||
|     - earthly +package-linux-amd64-rpm |     - earthly +package-linux-amd64-rpm | ||||||
|     - /home/gitlab-runner/scp-to-orchestrator.sh |     - /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: | build_repositories: | ||||||
|   stage: distribute |   stage: distribute | ||||||
|  |   rules: | ||||||
|  |     - if: '$CI_COMMIT_BRANCH =~ /v\d.+/' | ||||||
|   only: |   only: | ||||||
|     - stable |     - stable | ||||||
|   tags: |   tags: | ||||||
| @@ -110,6 +132,8 @@ build_repositories: | |||||||
|  |  | ||||||
| deploy_repos: | deploy_repos: | ||||||
|   stage: distribute |   stage: distribute | ||||||
|  |   rules: | ||||||
|  |     - if: '$CI_COMMIT_BRANCH =~ /v\d.+/' | ||||||
|   only: |   only: | ||||||
|     - stable |     - stable | ||||||
|   needs: |   needs: | ||||||
| @@ -121,6 +145,8 @@ deploy_repos: | |||||||
|  |  | ||||||
| delete_build_machines: | delete_build_machines: | ||||||
|   stage: distribute |   stage: distribute | ||||||
|  |   rules: | ||||||
|  |     - if: '$CI_COMMIT_BRANCH =~ /v\d.+/' | ||||||
|   only: |   only: | ||||||
|     - stable |     - stable | ||||||
|   tags: |   tags: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user