Skip to content
Snippets Groups Projects

allow for hotfixes

Merged Marco Wettstein requested to merge f/hotfixes into master
+ 34
9
@@ -57,7 +57,7 @@ image: panterch/docker-ci-kubernetes-deploy
yarn global add --silent semantic-release \
@semantic-release/commit-analyzer \
@semantic-release/release-notes-generator \
@semantic-release/git \
https://github.com/panter/git.git#b4037626cc583d3e9f7995ea0604b23730d0a22e \
@semantic-release/changelog \
@semantic-release/gitlab \
@semantic-release/exec;
@@ -70,7 +70,7 @@ image: panterch/docker-ci-kubernetes-deploy
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
["@semantic-release/git", {
"message": "chore(release): \${nextRelease.version}\n\n\${nextRelease.notes}"
"message": "chore(\${branch.type}): \${nextRelease.version}\n\n\${nextRelease.notes}"
}],
["@semantic-release/gitlab", {
"gitlabUrl": "https://git.panter.ch"
@@ -347,6 +347,7 @@ image: panterch/docker-ci-kubernetes-deploy
- production
- tags
- merge_requests
- /^[0-9]+\.([0-9]+|x)\.x$/ # hotfix branches
.only-storybook: &only-storybook
only:
refs:
@@ -361,6 +362,7 @@ image: panterch/docker-ci-kubernetes-deploy
only:
refs:
- merge_requests
- /^[0-9]+\.([0-9]+|x)\.x$/ # hotfix branches
.not-after-semantic-release: &not-after-semantic-release
except:
@@ -379,8 +381,7 @@ image: panterch/docker-ci-kubernetes-deploy
refs:
- master
.only-on-release-tag: &only-on-release-tag
only: ["tags"]
#----------------------
# DEFAULT STAGE TEMPLATES
@@ -491,6 +492,15 @@ image: panterch/docker-ci-kubernetes-deploy
extends: .kubernetes-review-stop
<<: *only-on-merge-request
# on hotfix branches, do automatic review-stop
.review-stop-automatic-on-hotfix:
tags:
stage: review-stop
extends: .kubernetes-review-stop
only:
refs:
- /^[0-9]+\.([0-9]+|x)\.x$/ # hotfix branches
.create-release-automatic:
stage: create-release
extends: .semantic-release-base
@@ -507,6 +517,7 @@ image: panterch/docker-ci-kubernetes-deploy
only:
refs:
- master
- /^[0-9]+\.([0-9]+|x)\.x$/ # hotfix branches
<<: *not-after-semantic-release
when: manual
@@ -519,36 +530,47 @@ image: panterch/docker-ci-kubernetes-deploy
.dev-deploy-after-release:
stage: deploy
<<: *only-on-release-tag
only: ["tags"]
# do not do the automatic release on hotfix branches
except:
variables:
- $CI_COMMIT_MESSAGE =~ /^chore\(maintenance\).*/ # do not do automatic release after a hotfix / maintenance release
extends: .deploy-to-kubernetes-dev
.stage-deploy-automatic:
stage: deploy
<<: *only-on-release-tag
only:
refs:
- tags
variables:
- $STAGING_ENABLED == "true"
# do not do the automatic release on hotfix branches
except:
variables:
- $CI_COMMIT_MESSAGE =~ /^chore\(maintenance\).*/ # do not do automatic release after a hotfix / maintenance release
extends: .deploy-to-kubernetes-stage
.stage-deploy:
stage: deploy
<<: *only-on-release-tag
only: ["tags"]
when: manual
extends: .deploy-to-kubernetes-stage
.prod-deploy-automatic:
stage: deploy
<<: *only-on-release-tag
only: ["tags"]
except:
variables:
- $STAGING_ENABLED == "true"
- $CI_COMMIT_MESSAGE =~ /^chore\(maintenance\).*/ # do not do automatic release after a hotfix / maintenance release
extends: .deploy-to-kubernetes-prod
.prod-deploy:
stage: deploy
<<: *only-on-release-tag
only: ["tags"]
when: manual
extends: .deploy-to-kubernetes-prod
@@ -609,6 +631,9 @@ review-deploy:
review-stop:
extends: .review-stop
review-stop-automatic-on-hotfix:
extends: .review-stop-automatic-on-hotfix
dev-deploy:
extends: .dev-deploy
Loading