Skip to content
Snippets Groups Projects
Commit e3752534 authored by Nicolas Schmid's avatar Nicolas Schmid
Browse files

feat: add merge rules for environment and release branches

parent a7608b52
Branches v0.1
Tags v0.1.0
No related merge requests found
Pipeline #2841 passed
stages: stages:
- checkmerge
- codestyle - codestyle
- test - test
- publish - publish
...@@ -14,7 +15,24 @@ stages: ...@@ -14,7 +15,24 @@ stages:
when: always when: always
# - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != "develop"' # - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != "develop"'
# when: always # when: always
check-environment-merges:
stage: checkmerge
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /\w*-environment$/'
when: always
script:
- if [[ $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ ^v[0-9]*.* ]]; then exit 0; else exit 1; fi
check-release-merges:
stage: checkmerge
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^v\d.*/'
when: always
script:
- if [[ $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == main ]]; then exit 0; else exit 1; fi
flake8-job: flake8-job:
stage: codestyle stage: codestyle
...@@ -81,7 +99,7 @@ deploy: ...@@ -81,7 +99,7 @@ deploy:
- /\w*-environment$/ - /\w*-environment$/
needs: ["publish"] needs: ["publish"]
environment: environment:
name: $CI_COMMIT_BRANCH name: ${CI_COMMIT_BRANCH}
image: alpine:latest image: alpine:latest
stage: deploy stage: deploy
tags: tags:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment