From 86287504ba219e8e3d7dd284fd16ddd95c25fba1 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Tue, 9 Feb 2021 12:34:55 +0800 Subject: [PATCH] ci: add general pipeline create rules - If a commit message starts with "test ci", push commit will trigger a pipeline - If an MR title starts with "WIP:" or "Draft:", push commit will NOT trigger a pipeline - If a commit message starts with "WIP:" or "Draft:", push commit will NOT trigger a pipeline --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 847022a4a8..62e2105b9c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,12 @@ workflow: # Disable those non-protected push triggered pipelines - if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_PIPELINE_SOURCE == "push"' when: never + - if: '$CI_COMMIT_TITLE =~ /^test[ _]ci:/' + when: always + - if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_TITLE =~ /^wip|draft:/i' + when: never + - if: '$CI_COMMIT_TITLE =~ /^wip|draft/i' + when: never - when: always variables: