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

ci: allow forks to have different names


When the fork of the "docs" repository is called something else, we need to
refer to it by the real name to successfully perform the replacement for merge
request pipelines.

Use some bash and CI_MERGE_REQUEST_SOURCE_PROJECT_PATH to find the bare name of
the project. This works because the variable is re-interpolated by bash during
job execution.

Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent 70713eae
No related branches found
Tags v2.0.0-beta
1 merge request!29ci: allow forks to have different names
Pipeline #11106 failed
......@@ -217,7 +217,9 @@ build-docs:
# thing we can do right now.
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
variables:
CI_ONIRO_REPO_WORKSPACE_LOCAL_MANIFEST: >
CI_ONIRO_REPO_WORKSPACE_LOCAL_MANIFEST_INTERPRETER: eval
CI_ONIRO_REPO_WORKSPACE_LOCAL_MANIFEST: |
cat <<__EOM__
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- remove original docs project entry -->
......@@ -225,8 +227,9 @@ build-docs:
<!-- add remote representing the project -->
<remote name="oniro-override" fetch="${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}/../" />
<!-- add docs at the exact version are testing -->
<project name="${CI_PROJECT_NAME}" path="docs" remote="oniro-override" revision="${CI_COMMIT_SHA}" />
<project name="$(basename "$CI_MERGE_REQUEST_SOURCE_PROJECT_PATH")" path="docs" remote="oniro-override" revision="${CI_COMMIT_SHA}" />
</manifest>
__EOM__
# Or when things land.
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
......
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