buildah manifest: add artifact-related options#5301
buildah manifest: add artifact-related options#5301openshift-merge-bot[bot] merged 11 commits intocontainers:mainfrom
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 <nalin@redhat.com>
github.com/docker/docker/client.NewVersionError() takes a context.Context now. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
... 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 <nalin@redhat.com>
... which will have netavark installed in it, so that tests won't just fail because it isn't there. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
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 <nalin@redhat.com>
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
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 <nalin@redhat.com>
... instead of github.com/containers/common/pkg/util.StringInSlice, per linters. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Locally-defined structs don't need to be aliases for themselves. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Lock an image index's image before attempting to modify or push it. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
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 <nalin@redhat.com>
68b2475 to
aca884a
Compare
| 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.
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.
Yes, that would have been better.
|
[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 DetailsNeeds 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 addgets a--artifactoption for telling it to create artifact manifests, and--artifact-type,--artifact-config-type,--artifact-layer-type,--artifact-exclude-titles, and--subjectoptions to fine-tune the contents of the artifact manifests it creates.Add a
--indexflag tobuildah manifest annotateso 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
--subjectflag tobuildah manifest annotatefor setting thesubjectfield of an image index.Add a
--annotationflag tobuildah manifest createto 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?