Skip to content

cmd: move the "upload" comand from bib here#396

Merged
mvo5 merged 13 commits intoosbuild:mainfrom
mvo5:move-upload
Dec 9, 2025
Merged

cmd: move the "upload" comand from bib here#396
mvo5 merged 13 commits intoosbuild:mainfrom
mvo5:move-upload

Conversation

@mvo5
Copy link
Contributor

@mvo5 mvo5 commented Dec 8, 2025

Almost all code of "bootc-image-builder" is now part of "image-builder". This is the last remaining piece - we have an "upload" command in bib that needs moving over here. This branch moves it (with history) and also adds a deprecation warning and README.md (for our future selfs).

achilleas-k and others added 13 commits December 8, 2025 10:51
Add new command for uploading a disk image to AWS and registering it as
an AMI.
The command expects credentials from the environment and the keys match
those that the AWS CLI uses.
Print error messages if either of the required env vars aren't set
instead of having the upload function fail with a less helpful error
message.
Create a new internal package called 'uploader' and move the core
functionality for AWS uploads to  a file called 'aws.go' in that
package.  The functions will be used by both the standalone uploader and
bootc-image-builder to upload images as part of the build.
awscloud.NewDefault() already supports authentication
via AWS_ACCESS_KEY_ID, credential file etc. No need for special
cases or special command line options here.
There is a bug in the bib code right now that when uploading the
AMI. It assume that the images are always build for the host
architecture. But bib supports building/uploading cross-architecture
images too.

Thanks to Ondrej for spotting this.
Add a new `--progress` option that defaults to `text` and show
upload progress when uploading an AMI.
This commit switches bib to the new uploader interface in images.

This requires osbuild/images#1185
New linter problems arose after updating golangci-lint's version.
This commit fixes the issue that with an unset --target-arch
the code will try to convert an empty string to an arch.Arch
which then fails. This is a regression from
osbuild/bootc-image-builder#1017
that was not caught.

Closes: osbuild/bootc-image-builder#1029
Update go.mod and do the required AI changes for v0.197.0
Add an explaination why we do consider the "upload" command
"legacy":

```
This contains the "legacy" upload command that was part of the
original bootc-image-builder source. We need to keep it around and put
it into the "bootc-image-builder" container to not break existing
users.

But it should not be used in the image-builder container or RPM. One
big issue is that we do not have enough data about the image to know
e.g. if it needs to be uploaded as a BIOS or hybrid image etc.
```
We do consider the upload command legacy and want to phase
it out in favor of:
a) just using the --upload flag from ibcli/bib
b) a more rich version of this command that requires that
   we put more metadata into the images so that decisions
   like boot type are captured that are needed by many
   clouds
So for now just print a warning so that people are aware.
@mvo5 mvo5 requested a review from a team as a code owner December 8, 2025 10:04
@mvo5 mvo5 requested review from achilleas-k, lzap and thozza and removed request for a team December 8, 2025 10:04
@mvo5 mvo5 enabled auto-merge December 8, 2025 15:35
@mvo5 mvo5 added this pull request to the merge queue Dec 9, 2025
Merged via the queue into osbuild:main with commit d1f7bd9 Dec 9, 2025
39 checks passed
@mvo5 mvo5 deleted the move-upload branch December 9, 2025 10:18
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Dec 9, 2025
This commit removes the upload command. It is still available
in the ibcli git repo [0] but given that its not actually part
of the bootc-image-builder container I wonder if we could
simply remove it everywhere?

[0] osbuild/image-builder-cli#396
achilleas-k pushed a commit to mvo5/bootc-image-builder that referenced this pull request Dec 9, 2025
This commit removes the upload command. It is still available
in the ibcli git repo [0] but given that its not actually part
of the bootc-image-builder container I wonder if we could
simply remove it everywhere?

[0] osbuild/image-builder-cli#396
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Dec 9, 2025
This commit removes the upload command. It is still available
in the ibcli git repo [0] but given that its not actually part
of the bootc-image-builder container I wonder if we could
simply remove it everywhere?

[0] osbuild/image-builder-cli#396
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Dec 12, 2025
This commit removes the upload command. It is still available
in the ibcli git repo [0] but given that its not actually part
of the bootc-image-builder container I wonder if we could
simply remove it everywhere?

[0] osbuild/image-builder-cli#396
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