Use containers.conf engine.platform as default platform#6698
Use containers.conf engine.platform as default platform#6698TrevorBurnham wants to merge 2 commits into
Conversation
|
Ephemeral COPR build failed. @containers/packit-build please check. |
|
Try adding this to the end of the top-level go.mod: replace (
go.podman.io/storage => github.com/TrevorBurnham/container-libs/storage add-engine-platform-config
go.podman.io/image/v5 => github.com/TrevorBurnham/container-libs/image/v5 add-engine-platform-config
go.podman.io/common => github.com/TrevorBurnham/container-libs/common add-engine-platform-config
)followed by a |
6219a24 to
a336f70
Compare
|
@TrevorBurnham looks like this needs a rebase now. |
| assert $status -eq 0 | ||
| alg="${output%%:*}" | ||
| hex="${output##*:}" | ||
| run jq -r '.os' "$TEST_SCRATCH_DIR"/output/blobs/"$alg"/"$hex" |
There was a problem hiding this comment.
This section can probably set local config="$TEST_SCRATCH_DIR"/output/$(oci_image_config "$TEST_SCRATCH_DIR"/output), and then point jq at "$config".
| cat >${TEST_SCRATCH_DIR}/containers.conf << EOF | ||
| [engine] | ||
| platform = "linux/amd64" | ||
| EOF |
There was a problem hiding this comment.
Most of our tests run on amd64, so I'm not sure that this ensures that we're using the value from the configuration file.
There was a problem hiding this comment.
Good call. I've switched to linux/arm64 so the test actually verifies that the config is being used.
a336f70 to
8afa014
Compare
When no --platform, --os, --arch, or --variant flags are specified, fall back to the platform value from containers.conf [engine] section. This allows users to set a default platform for all image operations (pull, build, from) without passing flags each time. Depends on: containers/container-libs#669 Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
Replace go.podman.io/common, go.podman.io/image/v5, and go.podman.io/storage with TrevorBurnham/container-libs@add-engine-platform-config to test the new engine platform config field in buildah CI. Depends on: containers/container-libs#669 Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
8afa014 to
5a58086
Compare
|
A friendly reminder that this PR had no activity for 30 days. |
Depends on: containers/container-libs#669
What type of PR is this?
/kind feature
What this PR does / why we need it:
When no --platform, --os, --arch, or --variant flags are specified, fall back to the platform value from containers.conf [engine] section.
How to verify it
containers.conf--platformflagFor example:
buildah pull alpine buildah inspect --format '{{.OCIv1.Architecture}}' alpineExpect: s390x
Which issue(s) this PR fixes:
Related to containers/podman#25641
Does this PR introduce a user-facing change?
Yes: