Skip to content
Snippets Groups Projects
Commit 503b23ae authored by Chase Qi's avatar Chase Qi
Browse files

.oniro-ci: use the same rule for rauc-bundle build and publish jobs


In `.gitlab-ci.yml`, rauc-bundle build and publish jobs all extends
`workspace-rules`, and the latter job needs the former job. This is
good.

However, with the rules defined on the upstream job
'.publish-rauc-bundle-to-hawkbit', gitlab always try to add rauc-bundle publish
jobs into pipeline, when the build jobs are not added, error occurs.

Signed-off-by: default avatarChase Qi <chase.qi@linaro.org>
parent 273a9703
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !127. Comments created here will be created in the context of that merge request.
......@@ -391,15 +391,6 @@
- hawkbitctl upload
-m "$CI_ONIRO_HAWKBIT_SWMOD_NAME:$BUNDLE_VERSION"
-a "${CI_PROJECT_DIR}/artifacts/images/${MACHINE}/$(readlink "${CI_PROJECT_DIR}/artifacts/images/${MACHINE}/${CI_ONIRO_RAUC_BUNDLE_NAME}-${MACHINE}.raucb")"
rules:
  • Author Reporter

    @zyga looks like this is the cause of #574. Tested on my fork with MR https://gitlab.eclipse.org/chaseqi/oniro/-/merge_requests/3

  • Developer

    We want those rules, we wanted them to be matched with .workspace-rules job but something is not working correctly yet.

  • Author Reporter

    @zyga ok, I see, so the publish jobs should be triggered manually for new MRs.

    This is the merged yaml https://gitlab.eclipse.org/chaseqi/oniro/-/ci/editor?tab=3, line #1551, the rule is not merged into the 'workspace-rules', it is placed above the extended rule(line #1559).

    I understand gitlab process the rules in serial, when it process the first if: $CI_PIPELINE_SOURCE == "merge_request_event" rule, it always try to add the publish job to pipeline. The required file changes defined in the 'workspace-rules' are not processed yet.

    It looks like we cannot simply reuse, we will need to re-define the rules for the publish jobs in the .gitlab-ci.yml.

    Edited by Chase Qi
  • Chase Qi @chaseqi

    changed this line in version 3 of the diff

    ·

    changed this line in version 3 of the diff

    Toggle commit list
  • Please register or sign in to reply
# Publishing is done only for scheduled builds
- if: '$CI_PIPELINE_SOURCE == "schedule"'
# Run the job when a tag is placed.
- if: '$CI_COMMIT_TAG'
# For merge requests, the publishing is optional and can be triggered manually.
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: manual
allow_failure: true
.build-zephyr-image:
extends: .build-image
......
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