Repository navigation
tools: add blip-alpine to bump the Alpine packages - #7199
Draft
christoph-zededa wants to merge 1 commit into
Draft
christoph-zededa wants to merge 1 commit into
christoph-zededa wants to merge 1 commit into
Conversation
blip-alpine does in one program what tools/bump-and-commit.sh does with bump_dockerfiles.pl, and then pushes the result and opens a pull request for it. It makes pkg/alpine build on top of the current eve-alpine image and gives every Dockerfile the tags of the packages as they are now, commits that, and repeats it until no hash changes any more. The outcome is one commit that touches nothing but lfedge/eve-* image tags. How it differs from the scripts: - A Dockerfile is changed on the syntax tree of openshift/imagebuilder: a tag is replaced where that changes the image that a FROM, an ARG default or a --from resolves to, and nowhere else. The text of the file is patched in place, so comments and layout stay. - The package hashes are computed the way linuxkit does it, and the git work (fetch, branch, reset, commit, push) is done with go-git. No make, no linuxkit and no git binary are involved. - The branch is pushed over https to the eve fork of the GitHub user that the token belongs to, and a draft pull request is opened on lf-edge/eve unless there is one already. With -d the tool only bumps and commits on the current branch: no branch switch, no reset, no push and no pull request. The README says where the GitHub token goes and which scopes it needs. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Christoph Ostarek <christoph@zededa.com>
Contributor
Author
|
the result can be seen here: #7200 |
Contributor
Author
|
TODO before this can become "Ready for review": only bump if there are actually changes |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7199 +/- ##
==========================================
+ Coverage 30.99% 31.43% +0.43%
==========================================
Files 562 573 +11
Lines 101231 102826 +1595
==========================================
+ Hits 31380 32321 +941
- Misses 67412 68109 +697
+ Partials 2439 2396 -43 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Description
Add
tools/blip-alpine, a Go tool that bumps the Alpine packages of EVE andopens a pull request for it. It does in one program what
tools/bump-and-commit.shdoes withbump_dockerfiles.pl, and then pushesthe result and opens the pull request. The scripts stay as they are.
The tool makes
pkg/alpinebuild on top of the current eve-alpine image andgives every Dockerfile the tags of the packages as they are now, commits
that, and repeats it until no hash changes any more. The outcome is one
commit that touches nothing but
lfedge/eve-*image tags.How it differs from the scripts:
is replaced where that changes the image that a
FROM, anARGdefault ora
--fromresolves to, and nowhere else. The text of the file is patchedin place, so comments and layout stay.
(fetch, branch, reset, commit, push) is done with go-git. No make, no
linuxkit and no git binary are involved.
evefork of the GitHub user thatthe token belongs to, and a draft pull request is opened on lf-edge/eve
unless there is one already.
With
-dthe tool only bumps and commits on the current branch: no branchswitch, no reset, no push and no pull request.
tools/blip-alpine/README.mddescribes the usage, where the GitHub tokengoes and which scopes it needs.
How to test and validate this PR
Unit tests, which need no network and no token:
A dry run, which needs a GitHub token (see the README) because the e-mail
address for the sign-off is read from GitHub. Use a scratch clone: the bump
commit lands on the branch that is checked out.
cd tools/blip-alpine go build ./blip-alpine -d git show --stat HEAD make -C ../.. check-docker-hashes-consistencyExpected: one commit
pkgs: bump pkg/alpine and all dependent pkgsthatchanges only image tags in Dockerfiles, a clean worktree, and a passing
check-docker-hashes-consistency. On the base of this branch that commitchanges 47 files, and the check passes on it.
A run without
-dswitches to the branchblip-alpine, resets it toorigin/master, force-pushes it to the fork of the token's user and opens adraft pull request on lf-edge/eve.
Changelog notes
No user-facing changes.
PR Backports
Checklist
And the last but not least:
check them.
Not checked: the tool runs on a developer machine and nothing of it ends up
on a device, so there is nothing to test on amd64 or arm64 devices. Labels
are not set yet.
🤖 Generated with Claude Code