Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CI tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Daniel Dehennin
CI tools
Commits
fc53ea41
Commit
fc53ea41
authored
3 years ago
by
Daniel Dehennin
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/skip-pipeline-keywords' into 'dev'
feat(rules): we want to skip pipelines on more keywords Closes
#2
See merge request
!13
parents
879b3df9
0a24edbe
Branches
dev
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/Rules.yaml
+36
-2
36 additions, 2 deletions
templates/Rules.yaml
with
36 additions
and
2 deletions
templates/Rules.yaml
+
36
−
2
View file @
fc53ea41
...
...
@@ -10,17 +10,33 @@
# - the release tags are prefixed with `$RELEASE_TAG_PREFIX`, by
# default `release/`
#
# Usage:
# USAGE
# =====
#
# echo-a-message-for-stable:
# extends: .on-stable
# script:
# - echo "This is a job running only from stable branch"
#
# Optional variables:
# OPTIONAL VARIABLES
# ==================
#
# - `STABLE_BRANCH`: name of the stable branch
# - `TESTING_BRANCH`: name of the pre-release testing branch
# - `DEV_BRANCH`: name of the developpement branch
#
# IMPORTANT NOTE
# ==============
#
# - Scheduled pipelines are always excluded.
# - Commit message containing the following are skipped:
# - default skip pattern https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/pipeline/chain/skip.rb#L10
# - message containing `draft` or `wip` (case insensitive) either followed by colon `:`
# or surrounded by brakets `[]` or parethesis `()`, for example:
# - `Draft: foo`
# - `wip foo`
# - `foo (draft)`
# - `foo [WIP]`
---
variables
:
STABLE_BRANCH
:
stable
...
...
@@ -41,6 +57,9 @@ variables:
when
:
never
-
if
:
$CI_COMMIT_BRANCH == $STABLE_BRANCH
when
:
never
# Exclude `Draft` or `WIP` messages
-
if
:
$CI_COMMIT_MESSAGE =~ /(?:draft|wip):|\[(?:draft|wip)\]|\((?:draft|wip)\)/i
when
:
never
-
if
:
$CI_COMMIT_BRANCH
when
:
on_success
...
...
@@ -58,6 +77,9 @@ variables:
when
:
never
-
if
:
$CI_COMMIT_BRANCH == $DEV_BRANCH
when
:
never
# Exclude `Draft` or `WIP` messages
-
if
:
$CI_COMMIT_MESSAGE =~ /(?:draft|wip):|\[(?:draft|wip)\]|\((?:draft|wip)\)/i
when
:
never
-
if
:
$CI_COMMIT_BRANCH
when
:
on_success
...
...
@@ -67,6 +89,9 @@ variables:
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"schedule"'
when
:
never
# Exclude `Draft` or `WIP` messages
-
if
:
$CI_COMMIT_MESSAGE =~ /(?:draft|wip):|\[(?:draft|wip)\]|\((?:draft|wip)\)/i
when
:
never
# Exclude $CI_DEFAULT_BRANCH of semantic-release commits
-
if
:
$CI_COMMIT_BRANCH == $DEV_BRANCH && $CI_COMMIT_MESSAGE =~ /^chore\(release\):/
when
:
never
...
...
@@ -79,6 +104,9 @@ variables:
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"schedule"'
when
:
never
# Exclude `Draft` or `WIP` messages
-
if
:
$CI_COMMIT_MESSAGE =~ /(?:draft|wip):|\[(?:draft|wip)\]|\((?:draft|wip)\)/i
when
:
never
# Exclude $CI_DEFAULT_BRANCH of semantic-release commits
-
if
:
$CI_COMMIT_BRANCH == $TESTING_BRANCH && $CI_COMMIT_MESSAGE =~ /^chore\(release\):/
when
:
never
...
...
@@ -91,6 +119,9 @@ variables:
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"schedule"'
when
:
never
# Exclude `Draft` or `WIP` messages
-
if
:
$CI_COMMIT_MESSAGE =~ /(?:draft|wip):|\[(?:draft|wip)\]|\((?:draft|wip)\)/i
when
:
never
# Exclude $CI_DEFAULT_BRANCH of semantic-release commits
-
if
:
$CI_COMMIT_BRANCH == $STABLE_BRANCH && $CI_COMMIT_MESSAGE =~ /^chore\(release\):/
when
:
never
...
...
@@ -103,6 +134,9 @@ variables:
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"schedule"'
when
:
never
# Exclude `Draft` or `WIP` messages
-
if
:
$CI_COMMIT_MESSAGE =~ /(?:draft|wip):|\[(?:draft|wip)\]|\((?:draft|wip)\)/i
when
:
never
# Only for protected release tags
-
if
:
$CI_COMMIT_TAG =~ /^release\// && $CI_COMMIT_REF_PROTECTED
when
:
on_success
...
...
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