From 5b33d39081801a62093874f9fdafc87bb067a06e Mon Sep 17 00:00:00 2001 From: Yannick DAYER <yannick.dayer@idiap.ch> Date: Mon, 10 Jun 2024 15:11:53 +0200 Subject: [PATCH] meta(CI): automatically select the profile branch. --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5f2814c..fc5f192 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,31 @@ +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == 'web' + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'parent_pipeline' + - if: $CI_COMMIT_TAG + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + include: + # Runs on dev-profile/main in default branch, when merging to the default + # branch, and in "tag pipelines". + - project: bob/dev-profile + ref: main + file: gitlab/python.yml + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_TAG + - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH + # Runs on dev-profile/develop in other branches (only when manually triggered) + # This is useful when trying new dependency pins in dev-profile/develop. - project: bob/dev-profile ref: develop file: gitlab/python.yml + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: never + - if: $CI_COMMIT_TAG + when: never + - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH + when: never + - when: always -- GitLab