From ab70b48f2e77989ac9bd147c3151f49eb16785b2 Mon Sep 17 00:00:00 2001
From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
Date: Tue, 18 May 2021 08:48:03 +0200
Subject: [PATCH] .ostc-ci: include local machines-and-flavours.yaml

Include the machines-and-flavours file explicitly, from the local
repository.  It is already included via the build-generic.yaml
project-include above, but including it again here allows GitLab to pick
up the changes to the definition straight away. The include done via the
manifest repository is using the default branch, so it cannot pick up
changes to this file as it is being modified by incoming branches.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
---
 .ostc-ci/gitlab-ci.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/.ostc-ci/gitlab-ci.yml b/.ostc-ci/gitlab-ci.yml
index 962f6ebb..e407b6f2 100644
--- a/.ostc-ci/gitlab-ci.yml
+++ b/.ostc-ci/gitlab-ci.yml
@@ -27,6 +27,12 @@ include:
     - 'reuse.yaml'
  - project: 'OSTC/OHOS/manifest'
    file: '.ostc-ci/build-generic.yaml'
+# By default, the CI pipeline is invoked using an explicit git ref (branch
+# name) in the manifest. This include is a HACK to allow the CI pipeline to get
+# changes to the machine-and-flavours.yaml picked up directly from the incoming
+# branch in the merge request instead of the explicit branch name in the
+# manifest.
+ - local: '/.ostc-ci/machines-and-flavours.yaml'
 
 dco:
   extends: .dco
-- 
GitLab