-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buildah manifest: add artifact-related options #5301
buildah manifest: add artifact-related options #5301
Conversation
/hold until after containers/common#1833 is merged, so that it doesn't depend on a branch in my personal fork. |
adbf537
to
70a6313
Compare
Ephemeral COPR build failed. @containers/packit-build please check. |
353916c
to
3a5c70a
Compare
9eb3c83
to
b0c2566
Compare
Can you change the common PR above to not be Do not merge? I think common is up 2 date. |
b0c2566
to
dad7450
Compare
Removing the update of github.com/containers/common from the first commit in the series. |
Oh, you meant "take the DO NOT MERGE off the description", since the previously-vendored version of common is from November. |
dad7450
to
68b2475
Compare
Update github.com/openshift/imagebuilder to the v1.2.6 release Update github.com/containers/common to the current tip of the main branch Signed-off-by: Nalin Dahyabhai <[email protected]>
github.com/docker/docker/client.NewVersionError() takes a context.Context now. Signed-off-by: Nalin Dahyabhai <[email protected]>
... in an attempt to try to get UID 0 in a user namespace to stop trying to read files from root's home directory, where the permissions error is treated as a hard failure. Signed-off-by: Nalin Dahyabhai <[email protected]>
... which will have netavark installed in it, so that tests won't just fail because it isn't there. Signed-off-by: Nalin Dahyabhai <[email protected]>
In tests/validate/pr-should-include-tests and tests/validate/whitespace.sh, use grep -E instead of egrep, because egrep keeps telling us to switch. Signed-off-by: Nalin Dahyabhai <[email protected]>
Signed-off-by: Nalin Dahyabhai <[email protected]>
github.com/cilium/ebpf v0.12.3 (the latest tag as of this moment) won't build on linux/loong64, but the tip of its main branch does. When v0.12.4 is released, and we're using that or a later version, we can turn it back on. Signed-off-by: Nalin Dahyabhai <[email protected]>
... instead of github.com/containers/common/pkg/util.StringInSlice, per linters. Signed-off-by: Nalin Dahyabhai <[email protected]>
Locally-defined structs don't need to be aliases for themselves. Signed-off-by: Nalin Dahyabhai <[email protected]>
Lock an image index's image before attempting to modify or push it. Signed-off-by: Nalin Dahyabhai <[email protected]>
Add functionality for creating artifact manifests and adding them to image indexes. `buildah manifest add` gets a `--artifact` option for telling it to create artifact manifests, and `--artifact-type`, `--artifact-config`, `--artifact-config-type`, `--artifact-layer-type`, `--artifact-exclude-titles`, and `--subject` options to fine-tune the contents of the artifact manifests it creates. Add a `--index` flag to `buildah manifest annotate` so that it can be told to set annotations on the index itself instead of on one of the entries in the image index. Add a `--subject` flag to `buildah manifest annotate` for setting the `subject` field of an image index. Add a `--annotation` flag to `buildah manifest create` to allow for adding annotations to the new image index. Signed-off-by: Nalin Dahyabhai <[email protected]>
68b2475
to
aca884a
Compare
@@ -511,6 +516,9 @@ func runUsingChroot(spec *specs.Spec, bundlePath string, ctty *os.File, stdin io | |||
cmd.Stdin, cmd.Stdout, cmd.Stderr = stdin, stdout, stderr | |||
cmd.Dir = "/" | |||
cmd.Env = []string{fmt.Sprintf("LOGLEVEL=%d", logrus.GetLevel())} | |||
if _, ok := os.LookupEnv(containersConfEnv); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Why not use the val passed back rather then calling os.Getenv() again.if
val, ok := os.LookupEnv(containersConfEnv); ok {
cmd.Env = append(cmd.Env, containersConfEnv+"="+val))
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would have been better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nalind, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
i verified it worked with multiple artifacts and quay ... great work @nalind /lgtm |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Add functionality for creating artifact manifests and adding them to image indexes.
buildah manifest add
gets a--artifact
option for telling it to create artifact manifests, and--artifact-type
,--artifact-config-type
,--artifact-layer-type
,--artifact-exclude-titles
, and--subject
options to fine-tune the contents of the artifact manifests it creates.Add a
--index
flag tobuildah manifest annotate
so that it can be told to set annotations on the index itself instead of on one of the entries in the image index.Add a
--subject
flag tobuildah manifest annotate
for setting thesubject
field of an image index.Add a
--annotation
flag tobuildah manifest create
to allow for adding annotations to the new image index.How to verify it
New integration tests!
Which issue(s) this PR fixes:
Fixes #5051
Special notes for your reviewer:
Does this PR introduce a user-facing change?