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:
- checkmerge
- codestyle
- test
- publish
......@@ -14,7 +15,24 @@ stages:
when: always
# - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != "develop"'
# 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:
stage: codestyle
......@@ -81,7 +99,7 @@ deploy:
- /\w*-environment$/
needs: ["publish"]
environment:
name: $CI_COMMIT_BRANCH
name: ${CI_COMMIT_BRANCH}
image: alpine:latest
stage: deploy
tags:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment