Skip to content

Add created-time OCI annotations to GitLab manifest publishing - #428

Open
wdconinc with Copilot wants to merge 4 commits into
masterfrom
copilot/add-time-annotation-to-job-image
Open

wdconinc with Copilot wants to merge 4 commits into
masterfrom
copilot/add-time-annotation-to-job-image

Conversation

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

The GitLab manifest jobs were publishing tags without a creation-time annotation. This updates both manifest paths so images created from .gitlab-ci.yml carry a consistent org.opencontainers.image.created timestamp.

  • Manifest annotation coverage

    • Add --annotation "index:org.opencontainers.image.created=..." to every docker buildx imagetools create invocation in:
      • base-manifest
      • eic-manifest
    • Covers internal, export, Docker Hub, GitHub Container Registry, and nightly tags.
  • Timestamp source

    • Use CI_PIPELINE_CREATED_AT as the primary timestamp so tags produced by the pipeline share the same creation time.
    • Fall back to current UTC time only if the pipeline timestamp is unavailable.
  • Compatibility guard

    • Fail early with a clear error if the available docker buildx imagetools create does not support --annotation, instead of silently publishing unannotated manifests.

Example of the change pattern:

CREATED_AT="${CI_PIPELINE_CREATED_AT:-$(date -u +%Y-%m-%dT%H:%M:%SZ)}"
CREATED_ANNOTATION="index:org.opencontainers.image.created=${CREATED_AT}"

docker buildx imagetools create \
  --annotation "${CREATED_ANNOTATION}" \
  --tag "${IMAGE_REPO}:${EXPORT_TAG}" \
  "${IMAGE_REPO}@${DIGEST}"

Copilot AI and others added 4 commits September 17, 2026 04:02
Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Copilot AI changed the title ci(gitlab): add manifest created annotations Add created-time OCI annotations to GitLab manifest publishing Sep 17, 2026
Copilot AI requested a review from wdconinc September 17, 2026 04:04
@wdconinc
wdconinc marked this pull request as ready for review September 17, 2026 04:07
Copilot AI lite review requested due to automatic review settings September 17, 2026 04:07

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.

🟡 Changes recommended

The new --annotation compatibility guard can mask real docker buildx failures as “flag unsupported”, which undermines the stated goal of failing early with a clear error.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR updates the GitLab CI manifest-publishing jobs to ensure manifests produced via .gitlab-ci.yml include a consistent OCI org.opencontainers.image.created timestamp, improving metadata completeness across published tags.

Changes:

  • Add a CI_PIPELINE_CREATED_AT-based org.opencontainers.image.created annotation (with UTC fallback) to docker buildx imagetools create calls in both manifest jobs.
  • Add an early guard that checks whether docker buildx imagetools create supports --annotation and fails the job otherwise.
File summaries
File Description
.gitlab-ci.yml Adds created-time OCI annotations to manifest tag publishing in base-manifest and eic-manifest, with a buildx compatibility guard.
Review details

Suppressed comments (1)

.gitlab-ci.yml:487

  • Same issue as base-manifest: the --help | grep pipeline can turn a real docker buildx failure into a misleading “does not support --annotation” error. Check that the help command succeeded first, then test for the flag (and write errors to stderr).
      docker buildx imagetools create --help | grep -q -- '--annotation' || { echo "ERROR: docker buildx imagetools create does not support --annotation"; exit 1; }
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .gitlab-ci.yml
script:
- apk add bash jq
- |
docker buildx imagetools create --help | grep -q -- '--annotation' || { echo "ERROR: docker buildx imagetools create does not support --annotation"; exit 1; }
@github-actions

Copy link
Copy Markdown

Capybara summary for PR 428

This branch was successfully deployed

1 active deployment
github-pages f9619672 Deployed Sep 17, 2026 by Copilot via deploy-artifacts-page #4123
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.

4 participants