From ff19b93acd0214739fb30fa0ed7ba98ef7235c54 Mon Sep 17 00:00:00 2001
From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
Date: Thu, 25 Feb 2021 13:17:29 +0100
Subject: [PATCH] Check for REUSE compliance, allowing failure

Following documentation from
https://git.ostc-eu.org/OSTC/infrastructure/pipelines/-/blob/main/reuse.yaml
Add the reuse job which can fail, since this repository is not compliant
with REUSE yet.

Closes: https://git.ostc-eu.org/OSTC/OHOS/meta-ohos/-/issues/24
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
---
 .ostc-ci/gitlab-ci.yml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/.ostc-ci/gitlab-ci.yml b/.ostc-ci/gitlab-ci.yml
index 5c2b15f1..b032419c 100644
--- a/.ostc-ci/gitlab-ci.yml
+++ b/.ostc-ci/gitlab-ci.yml
@@ -16,10 +16,20 @@
 
 # Abuse stages as a visual construct to make the pipeline more comprehensive.
 stages:
+ - compliance
  - Linux
  - Zephyr
  - FreeRTOS
 
+include:
+ - project: 'OSTC/infrastructure/pipelines'
+   file: 'reuse.yaml'
+
+reuse:
+  extends: .reuse
+  # FIXME: https://git.ostc-eu.org/OSTC/OHOS/meta-ohos/-/issues/19
+  allow_failure: true
+
 # This is a pipeline job that is used via the "extends" mechanism below.
 # For reference see https://docs.gitlab.com/ee/ci/yaml/README.html
 .workspace:
@@ -144,6 +154,8 @@ stages:
   # Set needs to an empty list to de-couple this job from anything preceding
   # it in the set of stages. This is an optimization which removes the
   # artificially created dependency between elements in different stages.
+  #
+  # TODO: depend on "reuse" when the allow_failure attribute is removed.
   needs: []
   variables:
     # Variables that are required by this job.
-- 
GitLab