Skip to content
Snippets Groups Projects
Commit 792228b3 authored by Zygmunt Krynicki's avatar Zygmunt Krynicki Committed by Stefan Schmidt
Browse files

.gitlab-ci.yml: fix testing changes to the manifest


The manifest is special, because when it changes the oniro repository is
cloned three times inside the CI process:

- first time by GitLab, as a part of the normal CI checkout process
- second time by repo init, as a part of the .workspace job
- last time by repo sync, as a part of the same job

When the manifest changes, the CI system should be testing the incoming
change. Crucially the second step needs to be adjusted, to take the
manifest from a non-default location. This was handled before the
manifest repository was merged into the oniro repository. During that
merge the critical step was lost.

Adjust the .bitbake-workspace job to inject variables that pick the
correct manifest repository and branch. Leave a comment for the untested
rule about CI for tags.

Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent e32e7af7
No related branches found
No related tags found
No related merge requests found
......@@ -61,13 +61,25 @@ aggregate-docs:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TITLE =~ /^(wip|draft):.*/i'
when: manual
variables:
# See below for rationale.
CI_ONIRO_MANIFEST_URL: "$CI_MERGE_REQUEST_SOURCE_PROJECT_URL"
CI_ONIRO_MANIFEST_BRANCH: "$CI_COMMIT_REF_NAME"
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
- assets/**/*
- flavours/**/*
- meta-*/**/*
- .oniro-ci/*
# When building a merge request substitute the CI_ONIRO_MANIFEST_URL to point
# to the incoming repository, and CI_ONIRO_MANIFEST_BRANCH, to the right
# branch name. This allows testing the changes coming into project. This
# is done here, so that it does not clobber scheduled pipelines.
variables:
CI_ONIRO_MANIFEST_URL: "$CI_MERGE_REQUEST_SOURCE_PROJECT_URL"
CI_ONIRO_MANIFEST_BRANCH: "$CI_COMMIT_REF_NAME"
- if: '$CI_COMMIT_TAG'
# XXX: This needs CI_ONIRO_MANIFEST_BRANCH as well, most likely.
# Mimic the updated rules for lava-test from the bitbake-workspace.
.lava-test:
......
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