diff --git a/templates/Rules.yaml b/templates/Rules.yaml index 5dfe4c4f25613528dab0254a3688caa529436d18..966fed44b447d1824b13d3693e93025274afab1f 100644 --- a/templates/Rules.yaml +++ b/templates/Rules.yaml @@ -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 diff --git a/templates/Runners/apps.education-docker.yaml b/templates/Runners/apps.education-docker.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7a7b446ad34e37aa8d629519a0364754703bd9a4 --- /dev/null +++ b/templates/Runners/apps.education-docker.yaml @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +default: + tags: + - one + - apps.education + - docker +...