Skip to content

Refresh base image SHAs in platforms.json via weekly workflow#2189

Merged
larsewi merged 3 commits intocfengine:masterfrom
larsewi:update-base-image-shas
Apr 23, 2026
Merged

Refresh base image SHAs in platforms.json via weekly workflow#2189
larsewi merged 3 commits intocfengine:masterfrom
larsewi:update-base-image-shas

Conversation

@larsewi
Copy link
Copy Markdown
Contributor

@larsewi larsewi commented Apr 22, 2026

Adds a new mechanism for keeping base_image_sha in platforms.json in sync with upstream Docker Hub digests.

  • build-in-container.py gains an --update-sha mode that queries Docker Hub for the current OCI index digest of each platform's base_image and rewrites base_image_sha accordingly.
  • Adds .github/workflows/update-base-image-shas.yml, modeled on update-base-images.yml, which runs weekly and opens a PR with any refreshed digests. Reviewers: larsewi, craigcomstock.
  • Small refactor: hoisted the repeated Path(__file__).resolve().parent / "platforms.json" into a CONFIG_PATH constant.

Rationale for keeping this separate from update-deps.yml (which also refreshes inputs):

  • platforms.json only exists on master, not on the release branches update-deps.yml targets, so bolting it on there would require a branch guard.
  • base_image_sha bumps benefit from their own reviewable PR rather than mixing with package-version bumps.

🤖 Generated with Claude Code

larsewi and others added 3 commits April 22, 2026 14:44
Queries Docker Hub for the current manifest digest of each platform's
base_image and rewrites base_image_sha accordingly. Intended to be wired
into the dependency update workflow so upstream base image pins are
refreshed alongside other dependencies.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
The same Path(__file__).resolve().parent / "platforms.json" expression
was computed in three places. Defining it once removes the duplication
without changing behavior.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Runs build-in-container.py --update-sha on a weekly schedule and opens a
PR with any refreshed digests. Modeled on update-base-images.yml, which
performs the analogous job for image_version.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@larsewi larsewi force-pushed the update-base-image-shas branch from fdacc77 to 2815895 Compare April 22, 2026 12:44
Comment thread build-in-container.py

# The v2 API requires a bearer token even for anonymous public pulls.
token_url = (
"https://auth.docker.io/token"
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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, so we grab an image from docker, install our build dependencies, then we push that to ghcr.io/cfengine. Think of this as the base image of our base image.

@larsewi larsewi merged commit 753f735 into cfengine:master Apr 23, 2026
1 check passed
@larsewi larsewi deleted the update-base-image-shas branch April 23, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants