From 6a2e47d3909e73aea1c9ba5f7a8753ffe13c07fd Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Thu, 13 Apr 2023 18:28:10 +0200 Subject: [PATCH] ci: Allow overriding the template in a manual or triggered pipeline This allows us to manually start a pipeline with a different version of the template or to automatically start one from a different repo. The intention is to use this in the ci-template to test changes automatically. --- .gitlab-ci.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2adfacfe..aeee1b6c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,16 +2,20 @@ include: - project: "famedly/company/frontend/ci-templates" ref: main file: "/all.yml" - -workflow: - rules: - - if: $CI_MERGE_REQUEST_IID - - if: $CI_COMMIT_TAG - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + rules: + - if: $OVERRIDE_INCLUDE_BRANCH == null || $OVERRIDE_INCLUDE_BRANCH == "" + - project: "famedly/company/frontend/ci-templates" + ref: $OVERRIDE_INCLUDE_BRANCH + file: "/all.yml" + rules: + - if: $OVERRIDE_INCLUDE_BRANCH variables: FLUTTER_IMAGE_TAG: "3.7.8" DART_IMAGE_TAG: "2.19.0" + OVERRIDE_INCLUDE_BRANCH: + description: "Change the branch used to include the CI template" + value: "main" coverage: stage: test