hotfix: make eic-manifest need optional - #380
Open
wdconinc wants to merge 2 commits into
Open
Conversation
Use a shared YAML anchor for the eic_ci matrix entry and reuse it in eic-manifest trigger-specific needs to avoid duplicating matrix parameters. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the GitLab CI configuration to reduce duplication by introducing a YAML anchor for the eic_ci parallel matrix entry in the eic job, then reusing that anchored matrix entry when specifying trigger-specific needs.parallel.matrix for eic-manifest.
Changes:
- Added an anchored
eic_cimatrix entry (&eic_ci_matrix_entry) in theeicjob’sparallel.matrix. - Removed
cifrom the sharedENV:list so it’s defined only once via the anchored entry. - Updated
eic-manifestto use trigger-specificneeds.parallel.matrixreferencing the anchored matrix entry.
Use optional need on the parallel eic job so external trigger pipelines remain valid when non-ci matrix jobs are skipped by rules. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.gitlab-ci.yml:484
- Making the
eicneed optional allowseic-manifestto be created even when noeicmatrix jobs exist in the pipeline. In that case this job will still run and thefor metadata_file in build-metadata-*.jsonloop will execute with a non-matching glob, causingjq/docker buildxcommands to fail. Consider adding a guard to exit successfully when no build-metadata artifacts are present, so optional needs doesn’t turn into a runtime failure.
optional: true
script:
- apk add bash jq
- |
for metadata_file in build-metadata-*.json; do
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
eic-manifesttoneedsthe paralleleicjob withoptional: trueversionas a required needeic_ciis built, without failing pipeline creation when other matrix jobs are skippedMotivation
On the current EICweb GitLab, rule-level matrix-selective needs for this case result in pipeline creation failure (
undefined need: eic). Usingoptional: trueis compatible and avoids hard-coding matrix child names.