Skip to content

Commit aa836d7

Browse files
fix(e2e): explicitly pass oci-mediatypes=true during image build
- pass oci-mediatypes=true to image build in distribution_inspect test - start testing against runc 1.5, containerd 2.3 Signed-off-by: Swapnanil Gupta <swpnlg@amazon.com>
1 parent 112eaef commit aa836d7

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ jobs:
8484
needs: [build]
8585
strategy:
8686
matrix:
87-
runc: ["1.3.3", "1.4.0"]
88-
containerd: ["1.7.30", "2.1.5", "2.2.1"]
89-
nerdctl: ["2.2.0", "2.2.1"]
87+
runc: ["1.3.0", 1.4.0", "1.5.0"]
88+
containerd: ["1.7.30", "2.1.5", "2.2.1", "2.3.2"]
89+
nerdctl: ["2.2.2", "2.3.0"]
9090
fail-fast: false
9191
timeout-minutes: 10
9292
steps:

e2e/tests/distribution_inspect.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ func DistributionInspect(opt *option.Option) {
7979
CMD ["echo", "bar"]
8080
`, defaultImage))
8181
DeferCleanup(os.RemoveAll, buildContext)
82-
command.Run(opt, "build", "-t", authImageTag, buildContext)
82+
// Since Buildkit v0.31.0, "oci-mediatypes" defaults to true. But pass "true" explicitly to make this test
83+
// compatible with older buildkit versions.
84+
command.Run(opt, "build", "--output", "type=image,oci-mediatypes=true", "-t", authImageTag, buildContext)
8385
})
8486

8587
AfterEach(func() {
@@ -181,7 +183,7 @@ func DistributionInspect(opt *option.Option) {
181183
err = json.NewDecoder(res.Body).Decode(&d)
182184
Expect(err).Should(BeNil())
183185
Expect(d.Descriptor).ShouldNot(BeNil())
184-
Expect(d.Descriptor.MediaType).Should(Equal("application/vnd.docker.distribution.manifest.v2+json"))
186+
Expect(d.Descriptor.MediaType).Should(Equal("application/vnd.oci.image.manifest.v1+json"))
185187
// since the image is built and pushed on the test runner, the following aspects are OS/architecture dependent
186188
// and not strictly checked
187189
Expect(d.Descriptor.Digest).Should(MatchRegexp(`sha256:\w{64}`))

setup-test-env.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

3-
DEFAULT_RUNC_VERSION="1.3.3"
3+
DEFAULT_RUNC_VERSION="1.4.0"
44
DEFAULT_CONTAINERD_VERSION="2.2.1"
5-
DEFAULT_NERDCTL_VERSION="2.2.1"
6-
DEFAULT_BUILDKIT_VERSION="0.26.3"
7-
DEFAULT_CNI_VERSION="1.9.0"
5+
DEFAULT_NERDCTL_VERSION="2.2.2"
6+
DEFAULT_BUILDKIT_VERSION="0.30.0"
7+
DEFAULT_CNI_VERSION="1.9.1"
88

99
# Parse command line arguments
1010
while [[ $# -gt 0 ]]; do

0 commit comments

Comments
 (0)