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

.oniro-ci,gitlab-ci.yml: add and display CI_ONIRO_MAGIC

Our GitLab pipeline jobs rely on both the .extends mechanism and the
re-definition-in-place mechanism, in order to avoid repetition.
Something is misbehaving, as evidenced by [1] and [2], suggesting that
the way GitLab computes the effective set of jobs in a pipiline is
different from what we understand.

The CI_ONIRO_MAGIC variable is set to the name and location of the job
defining the particular value. By showing the effective value of the
variable, we may gain some insight into what is going on in practice.

[1] eclipse/oniro-core/oniro#613
[2] eclipse/oniro-core/oniro#574



Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent 7175297f
No related branches found
No related tags found
No related merge requests found
Pipeline #4693 failed
...@@ -57,17 +57,21 @@ aggregate-docs: ...@@ -57,17 +57,21 @@ aggregate-docs:
# automatically, giving an option to the developer, to start the desired jobs # automatically, giving an option to the developer, to start the desired jobs
# manually. # manually.
.workspace-rules: .workspace-rules:
variables:
CI_ONIRO_MAGIC: .gitlab-ci.yml:61:.workspace-rules:
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"' - if: '$CI_PIPELINE_SOURCE == "schedule"'
variables: variables:
CI_ONIRO_MANIFEST_URL: "$CI_PROJECT_URL" CI_ONIRO_MANIFEST_URL: "$CI_PROJECT_URL"
CI_ONIRO_MANIFEST_BRANCH: "$CI_COMMIT_REF_NAME" CI_ONIRO_MANIFEST_BRANCH: "$CI_COMMIT_REF_NAME"
CI_ONIRO_MAGIC: .gitlab-ci.yml:67:.workspace-rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TITLE =~ /^(wip|draft):.*/i' - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TITLE =~ /^(wip|draft):.*/i'
when: manual when: manual
variables: variables:
# See below for rationale. # See below for rationale.
CI_ONIRO_MANIFEST_URL: "$CI_MERGE_REQUEST_SOURCE_PROJECT_URL" CI_ONIRO_MANIFEST_URL: "$CI_MERGE_REQUEST_SOURCE_PROJECT_URL"
CI_ONIRO_MANIFEST_BRANCH: "$CI_COMMIT_REF_NAME" CI_ONIRO_MANIFEST_BRANCH: "$CI_COMMIT_REF_NAME"
CI_ONIRO_MAGIC: .gitlab-ci.yml:74:.workspace-rules
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: changes:
- assets/**/* - assets/**/*
...@@ -83,6 +87,7 @@ aggregate-docs: ...@@ -83,6 +87,7 @@ aggregate-docs:
variables: variables:
CI_ONIRO_MANIFEST_URL: "$CI_MERGE_REQUEST_SOURCE_PROJECT_URL" CI_ONIRO_MANIFEST_URL: "$CI_MERGE_REQUEST_SOURCE_PROJECT_URL"
CI_ONIRO_MANIFEST_BRANCH: "$CI_COMMIT_REF_NAME" CI_ONIRO_MANIFEST_BRANCH: "$CI_COMMIT_REF_NAME"
CI_ONIRO_MAGIC: .gitlab-ci.yml:90:.workspace-rules
- if: '$CI_COMMIT_TAG' - if: '$CI_COMMIT_TAG'
# XXX: This needs CI_ONIRO_MANIFEST_BRANCH as well, most likely. # XXX: This needs CI_ONIRO_MANIFEST_BRANCH as well, most likely.
...@@ -102,9 +107,13 @@ aggregate-docs: ...@@ -102,9 +107,13 @@ aggregate-docs:
# that replace the previous value. # that replace the previous value.
.bitbake-workspace: .bitbake-workspace:
variables:
CI_ONIRO_MAGIC: .gitlab-ci.yml:111:.bitbake-workspace
extends: [.workspace, .workspace-rules] extends: [.workspace, .workspace-rules]
.build-rauc-bundle: .build-rauc-bundle:
variables:
CI_ONIRO_MAGIC: .gitlab-ci.yml:116:.build-rauc-bundle
extends: [.build-image, .workspace-rules] extends: [.build-image, .workspace-rules]
.publish-rauc-bundle-to-hawkbit: .publish-rauc-bundle-to-hawkbit:
......
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
CI_ONIRO_MANIFEST_MIRROR: oniro-develop CI_ONIRO_MANIFEST_MIRROR: oniro-develop
CI_ONIRO_GIT_REPO_PATH: "" CI_ONIRO_GIT_REPO_PATH: ""
CI_ONIRO_INSTANCE_SIZE: s3.large.8 CI_ONIRO_INSTANCE_SIZE: s3.large.8
CI_ONIRO_MAGIC: .oniro-ci/build-generic.yaml:.workspace
before_script: before_script:
- env | grep -E ^CI_ONIRO | sort
- test ! -e "$CI_PROJECT_DIR"/.scratch-dir-name || ( - test ! -e "$CI_PROJECT_DIR"/.scratch-dir-name || (
echo "precondition failed - concurrent modification of $CI_PROJECT_DIR" echo "precondition failed - concurrent modification of $CI_PROJECT_DIR"
&& env | grep CI_ | sort && env | grep CI_ | sort
...@@ -91,6 +93,7 @@ ...@@ -91,6 +93,7 @@
CI_ONIRO_BB_LOCAL_CONF_plus_equals_USER_CLASSES: "buildstats buildstats-summary" CI_ONIRO_BB_LOCAL_CONF_plus_equals_USER_CLASSES: "buildstats buildstats-summary"
CI_ONIRO_DEVTOOL_RECIPE_NAME: "" CI_ONIRO_DEVTOOL_RECIPE_NAME: ""
CI_ONIRO_DEVTOOL_LAYER_PATH: "" CI_ONIRO_DEVTOOL_LAYER_PATH: ""
CI_ONIRO_MAGIC: .oniro-ci/build-generic.yaml:.bitbake-workspace
before_script: before_script:
# Bitbake requires a non-root user to operate. # Bitbake requires a non-root user to operate.
......
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