diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 495beba10..0ddb46feb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,8 +58,8 @@ jobs: builtin: ["true", "false"] metadata-store: ["memory", "db"] exclude: - - buildargs: "" - builtin: "true" + # - buildargs: "" + # builtin: "true" - metadata-store: "db" builtin: "true" # - metadata-store: "db" @@ -103,9 +103,9 @@ jobs: # buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version buildargs: [""] builtin: ["true", "false"] - exclude: - - buildargs: "" - builtin: "true" + # exclude: + # - buildargs: "" + # builtin: "true" steps: - name: Install htpasswd for setting up private registry run: sudo apt-get update -y && sudo apt-get --no-install-recommends install -y apache2-utils @@ -126,9 +126,9 @@ jobs: # buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version buildargs: [""] builtin: ["true", "false"] - exclude: - - buildargs: "" - builtin: "true" + # exclude: + # - buildargs: "" + # builtin: "true" steps: - name: Install htpasswd for setting up private registry run: sudo apt-get update -y && sudo apt-get --no-install-recommends install -y apache2-utils @@ -151,8 +151,8 @@ jobs: builtin: ["true", "false"] metadata-store: ["memory", "db"] exclude: - - buildargs: "" - builtin: "true" + # - buildargs: "" + # builtin: "true" - metadata-store: "db" builtin: "true" # - metadata-store: "db" diff --git a/Dockerfile b/Dockerfile index 9a35969e7..12036b2f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,6 +63,16 @@ RUN apt-get update -y && apt-get install -y libbtrfs-dev libseccomp-dev && \ echo 'replace github.com/containerd/stargz-snapshotter => '$GOPATH'/src/github.com/containerd/stargz-snapshotter' >> integration/client/go.mod && \ echo 'replace github.com/containerd/stargz-snapshotter/estargz => '$GOPATH'/src/github.com/containerd/stargz-snapshotter/estargz' >> integration/client/go.mod ; \ fi && \ + if [ "$(echo -n ${CONTAINERD_VERSION} | head -c 4)" = "v1.7" ] ; then \ + # containerd v1.7 doesn't support cri-api >= v0.28 which adds RuntimeConfig API + echo 'replace k8s.io/cri-api => k8s.io/cri-api v0.27.1' >> go.mod ; \ + if [ -f api/go.mod ] ; then \ + echo 'replace k8s.io/cri-api => k8s.io/cri-api v0.27.1' >> api/go.mod ; \ + fi ; \ + if [ -f integration/client/go.mod ] ; then \ + echo 'replace k8s.io/cri-api => k8s.io/cri-api v0.27.1' >> integration/client/go.mod ; \ + fi ; \ + fi && \ echo 'package main \nimport _ "github.com/containerd/stargz-snapshotter/service/plugin"' > cmd/containerd/builtins_stargz_snapshotter.go && \ make vendor && make && DESTDIR=/out/ PREFIX= make install