Skip to content

fix(ci): push the exported GCE disk to GHCR by relative path - #2524

Merged
Brad-Edwards merged 1 commit into
devfrom
fix/packer-gcp-oras-relative-path
Oct 6, 2026
Merged

Brad-Edwards merged 1 commit into
devfrom
fix/packer-gcp-oras-relative-path

Conversation

@Brad-Edwards

Copy link
Copy Markdown
Owner

With #2514 the publish job now receives the exported disk URI, but oras push then failed: Error: absolute file path detected. If it's intentional, use --disable-path-validation. The disk was downloaded to an absolute mktemp path under RUNNER_TEMP.

  • The publish job downloads the disk into a dedicated temporary directory and pushes it by its relative name (<role>.tar.gz) from that directory.
  • ORAS's path validation stays enabled.
  • The bootstrap consumer (scripts/bootstrap/gcp_base_images.py) reads only the layer media type and digest, so the changed layer title is harmless.
  • test_deploy_workflow.py now asserts the relative push.

Verification

  • Locally with ORAS 1.3.4: the absolute path is rejected with the same error, and the relative path passes validation.
  • test_gcp_base_image_publish_uses_gce_native_contract_and_protected_ref_gate passes.

Needed to republish the Claude-free shifter-gce-kali and shifter-gce-ubuntu (#2510). GHCR publication only runs from dev or main.

Refs #2463

oras push rejects absolute file paths ("absolute file path detected"), so
the GHCR base-image publish failed after the disk download. Download into a
dedicated temporary directory and push the file by its relative name from
there, keeping ORAS's path validation on. The bootstrap consumer reads only the
layer's media type and digest, so the layer title changing is harmless.
@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

@Brad-Edwards
Brad-Edwards merged commit 6f700e3 into dev Oct 6, 2026
123 checks passed
@Brad-Edwards
Brad-Edwards deleted the fix/packer-gcp-oras-relative-path branch October 6, 2026 06:44
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.

1 participant