Skip to content

fix: cilium push.sh skip missing images instead of aborting#189

Merged
zhogu merged 1 commit into
devfrom
ruigao/fix-cilium-push-script
Jul 23, 2026
Merged

fix: cilium push.sh skip missing images instead of aborting#189
zhogu merged 1 commit into
devfrom
ruigao/fix-cilium-push-script

Conversation

@hippogr

@hippogr hippogr commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

When a local image doesn't exist (e.g. cilium-operator not built), the script now skips it and continues pushing remaining images instead of exiting due to set -e.

When a local image doesn't exist (e.g. cilium-operator not built),
the script now skips it and continues pushing remaining images instead
of exiting due to set -e.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 7, 2026 00:56
@hippogr
hippogr requested a review from zhogu July 7, 2026 00:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Cilium image push helper script so missing local images don’t abort the entire push process under set -euo pipefail, allowing remaining images to be tagged and pushed.

Changes:

  • Skip tagging/pushing for images that are not present locally (via docker image inspect).
  • Continue pushing other images even if a particular docker push fails, then exit non-zero at the end if any pushes failed.
  • Simplify the final completion message.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cilium/build/push.sh

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/cilium/build/push.sh:125

  • docker image inspect ... &>/dev/null will also fail when the Docker daemon/CLI is unavailable (not just when the image is missing). With this change the script would silently “skip” all images and finish successfully, masking a real failure (previously docker tag/push would fail fast under set -e). Consider adding a preflight docker info check (or similar) before the loop so Docker connectivity issues still cause a hard error.
FAILED=0
for local_img in "${!IMAGE_MAP[@]}"; do
    remote_img="${REGISTRY}/${IMAGE_MAP[$local_img]}"
    if ! docker image inspect "$local_img" &>/dev/null; then
        echo "Skipping ${local_img} (not found locally)"

@zhogu
zhogu merged commit fcbf72c into dev Jul 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants