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

gitlab-ci.yml: use OHOS_CI_GIT_REPO_PATH

With the improved .workspace and .build jobs merged into the manifest
repository [1], we can now set OHOS_CI_GIT_REPO_PATH and remove the
custom code that was necessary to implement this functionality before.

[1] https://git.ostc-eu.org/OSTC/OHOS/manifest/-/merge_requests/53



Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent 88dda7c3
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ include: ...@@ -26,7 +26,7 @@ include:
- 'reuse.yaml' - 'reuse.yaml'
- project: 'OSTC/OHOS/manifest' - project: 'OSTC/OHOS/manifest'
file: file:
# Include the set of build flavours. # Include the set of generic build rules.
- '.ostc-ci/build-generic.yaml' - '.ostc-ci/build-generic.yaml'
# Include the set of build flavours. # Include the set of build flavours.
- '.ostc-ci/build-flavours.yaml' - '.ostc-ci/build-flavours.yaml'
...@@ -43,8 +43,7 @@ reuse: ...@@ -43,8 +43,7 @@ reuse:
# Customize the generic .build job, included from build-generic.yaml above, # Customize the generic .build job, included from build-generic.yaml above,
# with an unique set of rules that enable the job and an override for the # with settings for testing updates to the meta-ohos git repository.
# OHOS_MANIFEST_BRANCH variable.
.build: .build:
variables: variables:
# The path of the git repository to deviate from what the git-repo manifest # The path of the git repository to deviate from what the git-repo manifest
...@@ -52,23 +51,7 @@ reuse: ...@@ -52,23 +51,7 @@ reuse:
# repository holding this CI pipeline. # repository holding this CI pipeline.
# #
# The path is relative to the checked out "sources/" directory. # The path is relative to the checked out "sources/" directory.
OHOS_GIT_REPO_PATH: "meta-ohos" OHOS_CI_GIT_REPO_PATH: "meta-ohos"
before_script:
# XXX: This test is repeated from build-generic.yaml .build before_script,
# de-duplicate that by moving this logic back to the generic script.
- test -n "$OHOS_RECIPE_NAME" || (
echo "precondition failed - set OHOS_RECIPE_NAME to the name of the recipe to build"
&& exit 1 )
# Check if the job is configured properly.
- test -n "$OHOS_GIT_REPO_PATH" || (
echo "precondition failed - set OHOS_GIT_REPO_PATH to the path of the git repository as described by the manifest"
&& exit 1 )
- !reference [.workspace, before_script]
# Switch the git repository which is being tested to the revision described
# by the CI environment variables. This effectively performs the update
# corresponding to the layer landing in either stable manifest or the
# development manifest.
- ( cd "$SCRATCH_DIR"/sources/"$OHOS_GIT_REPO_PATH" && git checkout "$CI_COMMIT_SHA" )
artifacts: artifacts:
# Disable collection of image artifacts. They are not used here and they # Disable collection of image artifacts. They are not used here and they
# are expensive to upload and store. # are expensive to upload and store.
......
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