Skip to content
Snippets Groups Projects
Commit d8194ee1 authored by Zygmunt Krynicki's avatar Zygmunt Krynicki
Browse files

gitlab-ci.yml: restrict job creation based on files changed

CI process in the meta-ohos repository is rather heavy, with large
number of long-running build jobs. The pipeline system allows
restricting job startup to a set of rules, and to further restrict each
rule to trigger only when one of a set of given files is modified.

This should allow efficient modification pipeline that only touches the
documentation or the meta-layers, without needlessly running unrelated
testing.

This is documented at https://docs.gitlab.com/ee/ci/yaml/#ruleschanges

Closes: https://git.ostc-eu.org/OSTC/OHOS/meta-ohos/-/issues/34


Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent 869b2882
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,11 @@ build-docs:
rules:
# Build the docs when a merge request is created.
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
# React to changes to the docs directory.
- docs/**
# Run this job in case the pipeline changes.
- .ostc-ci/*.yml
# Customize the generic .build job, included from build-generic.yaml above,
# with settings for testing updates to the meta-ohos git repository.
......@@ -67,3 +72,13 @@ build-docs:
# Disable collection of image artifacts. They are not used here and they
# are expensive to upload and store.
paths: []
rules:
# Perform bitbake build when a merge request is created.
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
# React to changes to meta-layers assets and flavours.
- assets/**
- flavours/**
- meta-*/**
# Run this job in case the pipeline changes.
- .ostc-ci/*.yml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment