Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HYDWS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Indu
HYDWS
Commits
e3752534
Commit
e3752534
authored
2 years ago
by
Nicolas Schmid
Browse files
Options
Downloads
Patches
Plain Diff
feat: add merge rules for environment and release branches
parent
a7608b52
Branches
v0.1
Branches containing commit
Tags
v0.1.0
Tags containing commit
No related merge requests found
Pipeline
#2841
passed
1 year ago
Stage: codestyle
Stage: test
Changes
1
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+20
-2
20 additions, 2 deletions
.gitlab-ci.yml
with
20 additions
and
2 deletions
.gitlab-ci.yml
+
20
−
2
View file @
e3752534
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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment