From f9808217b9fd2c6e43bf519fed4a09ea0f899240 Mon Sep 17 00:00:00 2001 From: Yang Xiao Date: Fri, 1 Sep 2023 14:51:28 +0800 Subject: [PATCH] fix: compares files with make output Signed-off-by: Yang Xiao --- test/release/build.test.sh | 512 ++---------------- test/release/cases.txt | 45 ++ .../build-with-push-bucket-staging.txt | 4 + .../testdata/build-with-push-bucket.txt | 4 + .../testdata/build-with-push-ghrelease.txt | 6 + test/release/testdata/build.txt | 2 + .../cluster-image-nerdctl-with-push.txt | 6 + .../testdata/cluster-image-nerdctl.txt | 3 + ...cluster-image-podman-with-push-staging.txt | 6 + .../cluster-image-with-push-staging.txt | 3 + .../testdata/cluster-image-with-push.txt | 3 + test/release/testdata/cluster-image.txt | 3 + .../cross-build-with-push-bucket-staging.txt | 24 + .../cross-build-with-push-ghrelease.txt | 36 ++ .../cross-build-with-push-staging.txt | 24 + .../testdata/cross-build-with-push.txt | 12 + test/release/testdata/cross-build.txt | 12 + ...luster-image-nerdctl-with-push-staging.txt | 6 + .../cross-cluster-image-nerdctl-with-push.txt | 6 + .../testdata/cross-cluster-image-nerdctl.txt | 3 + ...cluster-image-podman-with-push-staging.txt | 6 + .../cross-cluster-image-podman-with-push.txt | 6 + .../testdata/cross-cluster-image-podman.txt | 3 + .../cross-cluster-image-with-push-staging.txt | 3 + .../cross-cluster-image-with-push.txt | 3 + test/release/testdata/cross-cluster-image.txt | 3 + .../cross-image-nerdctl-with-push-staging.txt | 2 + .../cross-image-nerdctl-with-push.txt | 2 + test/release/testdata/cross-image-nerdctl.txt | 1 + .../cross-image-podman-with-push-staging.txt | 2 + .../testdata/cross-image-podman-with-push.txt | 2 + test/release/testdata/cross-image-podman.txt | 1 + .../cross-image-with-push-staging.txt | 1 + .../testdata/cross-image-with-push.txt | 1 + test/release/testdata/cross-image.txt | 1 + .../image-nerdctl-with-push-staging.txt | 2 + .../testdata/image-nerdctl-with-push.txt | 2 + test/release/testdata/image-nerdctl.txt | 1 + .../image-podman-with-push-staging.txt | 2 + .../testdata/image-podman-with-push.txt | 2 + test/release/testdata/image-podman.txt | 1 + .../testdata/image-with-push-staging.txt | 1 + test/release/testdata/image-with-push.txt | 1 + test/release/testdata/image.txt | 1 + .../testdata/manifests-with-push-bucket.txt | 8 + .../manifests-with-push-ghrelease.txt | 8 + test/release/testdata/manifests.txt | 7 + 47 files changed, 322 insertions(+), 471 deletions(-) create mode 100644 test/release/cases.txt create mode 100644 test/release/testdata/build-with-push-bucket-staging.txt create mode 100644 test/release/testdata/build-with-push-bucket.txt create mode 100644 test/release/testdata/build-with-push-ghrelease.txt create mode 100644 test/release/testdata/build.txt create mode 100644 test/release/testdata/cluster-image-nerdctl-with-push.txt create mode 100644 test/release/testdata/cluster-image-nerdctl.txt create mode 100644 test/release/testdata/cluster-image-podman-with-push-staging.txt create mode 100644 test/release/testdata/cluster-image-with-push-staging.txt create mode 100644 test/release/testdata/cluster-image-with-push.txt create mode 100644 test/release/testdata/cluster-image.txt create mode 100644 test/release/testdata/cross-build-with-push-bucket-staging.txt create mode 100644 test/release/testdata/cross-build-with-push-ghrelease.txt create mode 100644 test/release/testdata/cross-build-with-push-staging.txt create mode 100644 test/release/testdata/cross-build-with-push.txt create mode 100644 test/release/testdata/cross-build.txt create mode 100644 test/release/testdata/cross-cluster-image-nerdctl-with-push-staging.txt create mode 100644 test/release/testdata/cross-cluster-image-nerdctl-with-push.txt create mode 100644 test/release/testdata/cross-cluster-image-nerdctl.txt create mode 100644 test/release/testdata/cross-cluster-image-podman-with-push-staging.txt create mode 100644 test/release/testdata/cross-cluster-image-podman-with-push.txt create mode 100644 test/release/testdata/cross-cluster-image-podman.txt create mode 100644 test/release/testdata/cross-cluster-image-with-push-staging.txt create mode 100644 test/release/testdata/cross-cluster-image-with-push.txt create mode 100644 test/release/testdata/cross-cluster-image.txt create mode 100644 test/release/testdata/cross-image-nerdctl-with-push-staging.txt create mode 100644 test/release/testdata/cross-image-nerdctl-with-push.txt create mode 100644 test/release/testdata/cross-image-nerdctl.txt create mode 100644 test/release/testdata/cross-image-podman-with-push-staging.txt create mode 100644 test/release/testdata/cross-image-podman-with-push.txt create mode 100644 test/release/testdata/cross-image-podman.txt create mode 100644 test/release/testdata/cross-image-with-push-staging.txt create mode 100644 test/release/testdata/cross-image-with-push.txt create mode 100644 test/release/testdata/cross-image.txt create mode 100644 test/release/testdata/image-nerdctl-with-push-staging.txt create mode 100644 test/release/testdata/image-nerdctl-with-push.txt create mode 100644 test/release/testdata/image-nerdctl.txt create mode 100644 test/release/testdata/image-podman-with-push-staging.txt create mode 100644 test/release/testdata/image-podman-with-push.txt create mode 100644 test/release/testdata/image-podman.txt create mode 100644 test/release/testdata/image-with-push-staging.txt create mode 100644 test/release/testdata/image-with-push.txt create mode 100644 test/release/testdata/image.txt create mode 100644 test/release/testdata/manifests-with-push-bucket.txt create mode 100644 test/release/testdata/manifests-with-push-ghrelease.txt create mode 100644 test/release/testdata/manifests.txt diff --git a/test/release/build.test.sh b/test/release/build.test.sh index 314bd4ddd0..40bb835554 100755 --- a/test/release/build.test.sh +++ b/test/release/build.test.sh @@ -35,487 +35,57 @@ LAST_KUBE_RELEASE="$(echo "${SUPPORTED_KUBE_RELEASES}" | head -n 1)" IMAGE_PREFIX=image-prefix PREFIX=prefix -function want_build() { - cat <|g" | + sed "s|${HOME}|~|g" | + sed 's|/root/|~/|g' | + sed "s|${GOARCH}||g" | + sed "s|${GOOS}||g" | + sed "s|${VERSION}||g" | + sed 's|\.tar\.gz|.|g' | + sed 's|\.zip|.|g' } -function want_cross_image_podman_with_push_staging() { - cat <"${want_file}" + else + # prints the command to update the testdata + echo "------------------------------" + echo "cat <${want_file}" + echo "${got}" + echo "ALL" + echo "------------------------------" + fi + fi + echo "------------------------------" + done < ${CASES_PATH} if [[ "${#failed[@]}" -ne 0 ]]; then echo "Error: Some tests failed" diff --git a/test/release/cases.txt b/test/release/cases.txt new file mode 100644 index 0000000000..c48ff3c7f7 --- /dev/null +++ b/test/release/cases.txt @@ -0,0 +1,45 @@ +build,build +build-with-push-bucket,"PUSH=true BUCKET=bucket build" +build-with-push-bucket-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} build" +build-with-push-ghrelease,"PUSH=true GH_RELEASE=ghrelease build" +image,image +image-with-push,"PUSH=true image" +image-with-push-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} image" +image-nerdctl,"BUILDER=nerdctl image" +image-nerdctl-with-push,"BUILDER=nerdctl PUSH=true image" +image-nerdctl-with-push-staging,"BUILDER=nerdctl PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} image" +image-podman,"BUILDER=podman image" +image-podman-with-push,"BUILDER=podman PUSH=true image" +image-podman-with-push-staging,"BUILDER=podman PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} image" +cluster-image,"cluster-image" +cluster-image-with-push,"PUSH=true cluster-image" +cluster-image-with-push-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cluster-image" +cluster-image-nerdctl,"BUILDER=nerdctl cluster-image" +cluster-image-nerdctl-with-push,"BUILDER=nerdctl PUSH=true cluster-image" +cluster-image-podman-with-push-staging,"BUILDER=podman PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cluster-image" +cross-build,"cross-build" +cross-build-with-push,"PUSH=true cross-build" +cross-build-with-push-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} cross-build" +cross-build-with-push-bucket-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} cross-build" +cross-build-with-push-ghrelease,"PUSH=true GH_RELEASE=ghrelease cross-build" +cross-image,cross-image +cross-image-with-push,"PUSH=true cross-image" +cross-image-with-push-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} cross-image" +cross-image-nerdctl,"BUILDER=nerdctl cross-image" +cross-image-nerdctl-with-push,"BUILDER=nerdctl PUSH=true cross-image" +cross-image-nerdctl-with-push-staging,"BUILDER=nerdctl PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cross-image" +cross-image-podman,"BUILDER=podman cross-image" +cross-image-podman-with-push,"BUILDER=podman PUSH=true cross-image" +cross-image-podman-with-push-staging,"BUILDER=podman PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cross-image" +cross-cluster-image,"cross-cluster-image" +cross-cluster-image-with-push,"PUSH=true cross-cluster-image" +cross-cluster-image-with-push-staging,"PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cross-cluster-image" +cross-cluster-image-nerdctl,"BUILDER=nerdctl cross-cluster-image" +cross-cluster-image-nerdctl-with-push,"BUILDER=nerdctl PUSH=true cross-cluster-image" +cross-cluster-image-nerdctl-with-push-staging,"BUILDER=nerdctl PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cross-cluster-image" +cross-cluster-image-podman,"BUILDER=podman cross-cluster-image" +cross-cluster-image-podman-with-push,"BUILDER=podman PUSH=true cross-cluster-image" +cross-cluster-image-podman-with-push-staging,"BUILDER=podman PUSH=true BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} STAGING_IMAGE_PREFIX=${IMAGE_PREFIX} cross-cluster-image" +manifests,"MANIFESTS=kwok IMAGE_PREFIX=${IMAGE_PREFIX} manifests" +manifests-with-push-ghrelease,"PUSH=true MANIFESTS=kwok GH_RELEASE=ghrelease IMAGE_PREFIX=${IMAGE_PREFIX} manifests" +manifests-with-push-bucket,"PUSH=true MANIFESTS=kwok BUCKET=bucket STAGING=true STAGING_PREFIX=${PREFIX} IMAGE_PREFIX=${IMAGE_PREFIX} manifests" diff --git a/test/release/testdata/build-with-push-bucket-staging.txt b/test/release/testdata/build-with-push-bucket-staging.txt new file mode 100644 index 0000000000..5c46707551 --- /dev/null +++ b/test/release/testdata/build-with-push-bucket-staging.txt @@ -0,0 +1,4 @@ +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwok ./cmd/kwok +gsutil cp -P ./bin///kwok bucket/releases/prefix-/bin///kwok +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwokctl ./cmd/kwokctl +gsutil cp -P ./bin///kwokctl bucket/releases/prefix-/bin///kwokctl diff --git a/test/release/testdata/build-with-push-bucket.txt b/test/release/testdata/build-with-push-bucket.txt new file mode 100644 index 0000000000..07055f9eba --- /dev/null +++ b/test/release/testdata/build-with-push-bucket.txt @@ -0,0 +1,4 @@ +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwok ./cmd/kwok +gsutil cp -P ./bin///kwok bucket/releases//bin///kwok +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwokctl ./cmd/kwokctl +gsutil cp -P ./bin///kwokctl bucket/releases//bin///kwokctl diff --git a/test/release/testdata/build-with-push-ghrelease.txt b/test/release/testdata/build-with-push-ghrelease.txt new file mode 100644 index 0000000000..584072d79f --- /dev/null +++ b/test/release/testdata/build-with-push-ghrelease.txt @@ -0,0 +1,6 @@ +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwok ./cmd/kwok +cp ./bin///kwok kwok-- +gh -R ghrelease release upload kwok-- +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwokctl ./cmd/kwokctl +cp ./bin///kwokctl kwokctl-- +gh -R ghrelease release upload kwokctl-- diff --git a/test/release/testdata/build.txt b/test/release/testdata/build.txt new file mode 100644 index 0000000000..280b18454e --- /dev/null +++ b/test/release/testdata/build.txt @@ -0,0 +1,2 @@ +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwok ./cmd/kwok +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwokctl ./cmd/kwokctl diff --git a/test/release/testdata/cluster-image-nerdctl-with-push.txt b/test/release/testdata/cluster-image-nerdctl-with-push.txt new file mode 100644 index 0000000000..fa6298229a --- /dev/null +++ b/test/release/testdata/cluster-image-nerdctl-with-push.txt @@ -0,0 +1,6 @@ +nerdctl build --build-arg=kube_version=v1.28.0 --tag=cluster:-k8s.v1.28.0 --platform=/ -f ./images/cluster/Dockerfile . +nerdctl push --platform=/ cluster:-k8s.v1.28.0 +nerdctl build --build-arg=kube_version=v1.27.3 --tag=cluster:-k8s.v1.27.3 --platform=/ -f ./images/cluster/Dockerfile . +nerdctl push --platform=/ cluster:-k8s.v1.27.3 +nerdctl build --build-arg=kube_version=v1.26.6 --tag=cluster:-k8s.v1.26.6 --platform=/ -f ./images/cluster/Dockerfile . +nerdctl push --platform=/ cluster:-k8s.v1.26.6 diff --git a/test/release/testdata/cluster-image-nerdctl.txt b/test/release/testdata/cluster-image-nerdctl.txt new file mode 100644 index 0000000000..eabed64af4 --- /dev/null +++ b/test/release/testdata/cluster-image-nerdctl.txt @@ -0,0 +1,3 @@ +nerdctl build --build-arg=kube_version=v1.28.0 --tag=cluster:-k8s.v1.28.0 --platform=/ -f ./images/cluster/Dockerfile . +nerdctl build --build-arg=kube_version=v1.27.3 --tag=cluster:-k8s.v1.27.3 --platform=/ -f ./images/cluster/Dockerfile . +nerdctl build --build-arg=kube_version=v1.26.6 --tag=cluster:-k8s.v1.26.6 --platform=/ -f ./images/cluster/Dockerfile . diff --git a/test/release/testdata/cluster-image-podman-with-push-staging.txt b/test/release/testdata/cluster-image-podman-with-push-staging.txt new file mode 100644 index 0000000000..97128b4b51 --- /dev/null +++ b/test/release/testdata/cluster-image-podman-with-push-staging.txt @@ -0,0 +1,6 @@ +podman build --build-arg=kube_version=v1.28.0 --tag=image-prefix/cluster:prefix--k8s.v1.28.0 --platform=/ -f ./images/cluster/Dockerfile . +podman push --platform=/ image-prefix/cluster:prefix--k8s.v1.28.0 +podman build --build-arg=kube_version=v1.27.3 --tag=image-prefix/cluster:prefix--k8s.v1.27.3 --platform=/ -f ./images/cluster/Dockerfile . +podman push --platform=/ image-prefix/cluster:prefix--k8s.v1.27.3 +podman build --build-arg=kube_version=v1.26.6 --tag=image-prefix/cluster:prefix--k8s.v1.26.6 --platform=/ -f ./images/cluster/Dockerfile . +podman push --platform=/ image-prefix/cluster:prefix--k8s.v1.26.6 diff --git a/test/release/testdata/cluster-image-with-push-staging.txt b/test/release/testdata/cluster-image-with-push-staging.txt new file mode 100644 index 0000000000..901149cb10 --- /dev/null +++ b/test/release/testdata/cluster-image-with-push-staging.txt @@ -0,0 +1,3 @@ +docker buildx build --build-arg=kube_version=v1.28.0 --tag=image-prefix/cluster:prefix--k8s.v1.28.0 --platform=/ --push -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.27.3 --tag=image-prefix/cluster:prefix--k8s.v1.27.3 --platform=/ --push -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.26.6 --tag=image-prefix/cluster:prefix--k8s.v1.26.6 --platform=/ --push -f ./images/cluster/Dockerfile . diff --git a/test/release/testdata/cluster-image-with-push.txt b/test/release/testdata/cluster-image-with-push.txt new file mode 100644 index 0000000000..d57e3042b3 --- /dev/null +++ b/test/release/testdata/cluster-image-with-push.txt @@ -0,0 +1,3 @@ +docker buildx build --build-arg=kube_version=v1.28.0 --tag=cluster:-k8s.v1.28.0 --platform=/ --push -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.27.3 --tag=cluster:-k8s.v1.27.3 --platform=/ --push -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.26.6 --tag=cluster:-k8s.v1.26.6 --platform=/ --push -f ./images/cluster/Dockerfile . diff --git a/test/release/testdata/cluster-image.txt b/test/release/testdata/cluster-image.txt new file mode 100644 index 0000000000..ad60693b29 --- /dev/null +++ b/test/release/testdata/cluster-image.txt @@ -0,0 +1,3 @@ +docker buildx build --build-arg=kube_version=v1.28.0 --tag=cluster:-k8s.v1.28.0 --platform=/ --load -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.27.3 --tag=cluster:-k8s.v1.27.3 --platform=/ --load -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.26.6 --tag=cluster:-k8s.v1.26.6 --platform=/ --load -f ./images/cluster/Dockerfile . diff --git a/test/release/testdata/cross-build-with-push-bucket-staging.txt b/test/release/testdata/cross-build-with-push-bucket-staging.txt new file mode 100644 index 0000000000..a354f24b57 --- /dev/null +++ b/test/release/testdata/cross-build-with-push-bucket-staging.txt @@ -0,0 +1,24 @@ +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwok ./cmd/kwok +gsutil cp -P ./bin///kwok bucket/releases/prefix-/bin///kwok +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwokctl ./cmd/kwokctl +gsutil cp -P ./bin///kwokctl bucket/releases/prefix-/bin///kwokctl +GOOS= GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin//arm64/kwok ./cmd/kwok +gsutil cp -P ./bin//arm64/kwok bucket/releases/prefix-/bin//arm64/kwok +GOOS= GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin//arm64/kwokctl ./cmd/kwokctl +gsutil cp -P ./bin//arm64/kwokctl bucket/releases/prefix-/bin//arm64/kwokctl +GOOS=darwin GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin//kwok ./cmd/kwok +gsutil cp -P ./bin/darwin//kwok bucket/releases/prefix-/bin/darwin//kwok +GOOS=darwin GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin//kwokctl ./cmd/kwokctl +gsutil cp -P ./bin/darwin//kwokctl bucket/releases/prefix-/bin/darwin//kwokctl +GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwok ./cmd/kwok +gsutil cp -P ./bin/darwin/arm64/kwok bucket/releases/prefix-/bin/darwin/arm64/kwok +GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwokctl ./cmd/kwokctl +gsutil cp -P ./bin/darwin/arm64/kwokctl bucket/releases/prefix-/bin/darwin/arm64/kwokctl +GOOS=windows GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows//kwok.exe ./cmd/kwok +gsutil cp -P ./bin/windows//kwok.exe bucket/releases/prefix-/bin/windows//kwok.exe +GOOS=windows GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows//kwokctl.exe ./cmd/kwokctl +gsutil cp -P ./bin/windows//kwokctl.exe bucket/releases/prefix-/bin/windows//kwokctl.exe +GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwok.exe ./cmd/kwok +gsutil cp -P ./bin/windows/arm64/kwok.exe bucket/releases/prefix-/bin/windows/arm64/kwok.exe +GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwokctl.exe ./cmd/kwokctl +gsutil cp -P ./bin/windows/arm64/kwokctl.exe bucket/releases/prefix-/bin/windows/arm64/kwokctl.exe diff --git a/test/release/testdata/cross-build-with-push-ghrelease.txt b/test/release/testdata/cross-build-with-push-ghrelease.txt new file mode 100644 index 0000000000..c2d0d2a16d --- /dev/null +++ b/test/release/testdata/cross-build-with-push-ghrelease.txt @@ -0,0 +1,36 @@ +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwok ./cmd/kwok +cp ./bin///kwok kwok-- +gh -R ghrelease release upload kwok-- +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwokctl ./cmd/kwokctl +cp ./bin///kwokctl kwokctl-- +gh -R ghrelease release upload kwokctl-- +GOOS= GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin//arm64/kwok ./cmd/kwok +cp ./bin//arm64/kwok kwok--arm64 +gh -R ghrelease release upload kwok--arm64 +GOOS= GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin//arm64/kwokctl ./cmd/kwokctl +cp ./bin//arm64/kwokctl kwokctl--arm64 +gh -R ghrelease release upload kwokctl--arm64 +GOOS=darwin GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin//kwok ./cmd/kwok +cp ./bin/darwin//kwok kwok-darwin- +gh -R ghrelease release upload kwok-darwin- +GOOS=darwin GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin//kwokctl ./cmd/kwokctl +cp ./bin/darwin//kwokctl kwokctl-darwin- +gh -R ghrelease release upload kwokctl-darwin- +GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwok ./cmd/kwok +cp ./bin/darwin/arm64/kwok kwok-darwin-arm64 +gh -R ghrelease release upload kwok-darwin-arm64 +GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwokctl ./cmd/kwokctl +cp ./bin/darwin/arm64/kwokctl kwokctl-darwin-arm64 +gh -R ghrelease release upload kwokctl-darwin-arm64 +GOOS=windows GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows//kwok.exe ./cmd/kwok +cp ./bin/windows//kwok.exe kwok-windows-.exe +gh -R ghrelease release upload kwok-windows-.exe +GOOS=windows GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows//kwokctl.exe ./cmd/kwokctl +cp ./bin/windows//kwokctl.exe kwokctl-windows-.exe +gh -R ghrelease release upload kwokctl-windows-.exe +GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwok.exe ./cmd/kwok +cp ./bin/windows/arm64/kwok.exe kwok-windows-arm64.exe +gh -R ghrelease release upload kwok-windows-arm64.exe +GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwokctl.exe ./cmd/kwokctl +cp ./bin/windows/arm64/kwokctl.exe kwokctl-windows-arm64.exe +gh -R ghrelease release upload kwokctl-windows-arm64.exe diff --git a/test/release/testdata/cross-build-with-push-staging.txt b/test/release/testdata/cross-build-with-push-staging.txt new file mode 100644 index 0000000000..a354f24b57 --- /dev/null +++ b/test/release/testdata/cross-build-with-push-staging.txt @@ -0,0 +1,24 @@ +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwok ./cmd/kwok +gsutil cp -P ./bin///kwok bucket/releases/prefix-/bin///kwok +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwokctl ./cmd/kwokctl +gsutil cp -P ./bin///kwokctl bucket/releases/prefix-/bin///kwokctl +GOOS= GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin//arm64/kwok ./cmd/kwok +gsutil cp -P ./bin//arm64/kwok bucket/releases/prefix-/bin//arm64/kwok +GOOS= GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin//arm64/kwokctl ./cmd/kwokctl +gsutil cp -P ./bin//arm64/kwokctl bucket/releases/prefix-/bin//arm64/kwokctl +GOOS=darwin GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin//kwok ./cmd/kwok +gsutil cp -P ./bin/darwin//kwok bucket/releases/prefix-/bin/darwin//kwok +GOOS=darwin GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin//kwokctl ./cmd/kwokctl +gsutil cp -P ./bin/darwin//kwokctl bucket/releases/prefix-/bin/darwin//kwokctl +GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwok ./cmd/kwok +gsutil cp -P ./bin/darwin/arm64/kwok bucket/releases/prefix-/bin/darwin/arm64/kwok +GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwokctl ./cmd/kwokctl +gsutil cp -P ./bin/darwin/arm64/kwokctl bucket/releases/prefix-/bin/darwin/arm64/kwokctl +GOOS=windows GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows//kwok.exe ./cmd/kwok +gsutil cp -P ./bin/windows//kwok.exe bucket/releases/prefix-/bin/windows//kwok.exe +GOOS=windows GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows//kwokctl.exe ./cmd/kwokctl +gsutil cp -P ./bin/windows//kwokctl.exe bucket/releases/prefix-/bin/windows//kwokctl.exe +GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwok.exe ./cmd/kwok +gsutil cp -P ./bin/windows/arm64/kwok.exe bucket/releases/prefix-/bin/windows/arm64/kwok.exe +GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwokctl.exe ./cmd/kwokctl +gsutil cp -P ./bin/windows/arm64/kwokctl.exe bucket/releases/prefix-/bin/windows/arm64/kwokctl.exe diff --git a/test/release/testdata/cross-build-with-push.txt b/test/release/testdata/cross-build-with-push.txt new file mode 100644 index 0000000000..f4d2d437b1 --- /dev/null +++ b/test/release/testdata/cross-build-with-push.txt @@ -0,0 +1,12 @@ +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwok ./cmd/kwok +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwokctl ./cmd/kwokctl +GOOS= GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin//arm64/kwok ./cmd/kwok +GOOS= GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin//arm64/kwokctl ./cmd/kwokctl +GOOS=darwin GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin//kwok ./cmd/kwok +GOOS=darwin GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin//kwokctl ./cmd/kwokctl +GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwok ./cmd/kwok +GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwokctl ./cmd/kwokctl +GOOS=windows GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows//kwok.exe ./cmd/kwok +GOOS=windows GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows//kwokctl.exe ./cmd/kwokctl +GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwok.exe ./cmd/kwok +GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwokctl.exe ./cmd/kwokctl diff --git a/test/release/testdata/cross-build.txt b/test/release/testdata/cross-build.txt new file mode 100644 index 0000000000..f4d2d437b1 --- /dev/null +++ b/test/release/testdata/cross-build.txt @@ -0,0 +1,12 @@ +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwok ./cmd/kwok +GOOS= GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin///kwokctl ./cmd/kwokctl +GOOS= GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin//arm64/kwok ./cmd/kwok +GOOS= GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin//arm64/kwokctl ./cmd/kwokctl +GOOS=darwin GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin//kwok ./cmd/kwok +GOOS=darwin GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin//kwokctl ./cmd/kwokctl +GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwok ./cmd/kwok +GOOS=darwin GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/darwin/arm64/kwokctl ./cmd/kwokctl +GOOS=windows GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows//kwok.exe ./cmd/kwok +GOOS=windows GOARCH= go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows//kwokctl.exe ./cmd/kwokctl +GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwok.exe ./cmd/kwok +GOOS=windows GOARCH=arm64 go build -ldflags '-X sigs.k8s.io/kwok/pkg/consts.Version= -X sigs.k8s.io/kwok/pkg/consts.KubeVersion=v1.28.0' -o ./bin/windows/arm64/kwokctl.exe ./cmd/kwokctl diff --git a/test/release/testdata/cross-cluster-image-nerdctl-with-push-staging.txt b/test/release/testdata/cross-cluster-image-nerdctl-with-push-staging.txt new file mode 100644 index 0000000000..1e41fa908e --- /dev/null +++ b/test/release/testdata/cross-cluster-image-nerdctl-with-push-staging.txt @@ -0,0 +1,6 @@ +nerdctl build --build-arg=kube_version=v1.28.0 --tag=image-prefix/cluster:prefix--k8s.v1.28.0 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +nerdctl push --platform=/ --platform=/arm64 image-prefix/cluster:prefix--k8s.v1.28.0 +nerdctl build --build-arg=kube_version=v1.27.3 --tag=image-prefix/cluster:prefix--k8s.v1.27.3 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +nerdctl push --platform=/ --platform=/arm64 image-prefix/cluster:prefix--k8s.v1.27.3 +nerdctl build --build-arg=kube_version=v1.26.6 --tag=image-prefix/cluster:prefix--k8s.v1.26.6 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +nerdctl push --platform=/ --platform=/arm64 image-prefix/cluster:prefix--k8s.v1.26.6 diff --git a/test/release/testdata/cross-cluster-image-nerdctl-with-push.txt b/test/release/testdata/cross-cluster-image-nerdctl-with-push.txt new file mode 100644 index 0000000000..7b044d6797 --- /dev/null +++ b/test/release/testdata/cross-cluster-image-nerdctl-with-push.txt @@ -0,0 +1,6 @@ +nerdctl build --build-arg=kube_version=v1.28.0 --tag=cluster:-k8s.v1.28.0 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +nerdctl push --platform=/ --platform=/arm64 cluster:-k8s.v1.28.0 +nerdctl build --build-arg=kube_version=v1.27.3 --tag=cluster:-k8s.v1.27.3 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +nerdctl push --platform=/ --platform=/arm64 cluster:-k8s.v1.27.3 +nerdctl build --build-arg=kube_version=v1.26.6 --tag=cluster:-k8s.v1.26.6 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +nerdctl push --platform=/ --platform=/arm64 cluster:-k8s.v1.26.6 diff --git a/test/release/testdata/cross-cluster-image-nerdctl.txt b/test/release/testdata/cross-cluster-image-nerdctl.txt new file mode 100644 index 0000000000..2d272297b4 --- /dev/null +++ b/test/release/testdata/cross-cluster-image-nerdctl.txt @@ -0,0 +1,3 @@ +nerdctl build --build-arg=kube_version=v1.28.0 --tag=cluster:-k8s.v1.28.0 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +nerdctl build --build-arg=kube_version=v1.27.3 --tag=cluster:-k8s.v1.27.3 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +nerdctl build --build-arg=kube_version=v1.26.6 --tag=cluster:-k8s.v1.26.6 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . diff --git a/test/release/testdata/cross-cluster-image-podman-with-push-staging.txt b/test/release/testdata/cross-cluster-image-podman-with-push-staging.txt new file mode 100644 index 0000000000..b1e9b82b4b --- /dev/null +++ b/test/release/testdata/cross-cluster-image-podman-with-push-staging.txt @@ -0,0 +1,6 @@ +podman build --build-arg=kube_version=v1.28.0 --tag=image-prefix/cluster:prefix--k8s.v1.28.0 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +podman push --platform=/ --platform=/arm64 image-prefix/cluster:prefix--k8s.v1.28.0 +podman build --build-arg=kube_version=v1.27.3 --tag=image-prefix/cluster:prefix--k8s.v1.27.3 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +podman push --platform=/ --platform=/arm64 image-prefix/cluster:prefix--k8s.v1.27.3 +podman build --build-arg=kube_version=v1.26.6 --tag=image-prefix/cluster:prefix--k8s.v1.26.6 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +podman push --platform=/ --platform=/arm64 image-prefix/cluster:prefix--k8s.v1.26.6 diff --git a/test/release/testdata/cross-cluster-image-podman-with-push.txt b/test/release/testdata/cross-cluster-image-podman-with-push.txt new file mode 100644 index 0000000000..91d402a05f --- /dev/null +++ b/test/release/testdata/cross-cluster-image-podman-with-push.txt @@ -0,0 +1,6 @@ +podman build --build-arg=kube_version=v1.28.0 --tag=cluster:-k8s.v1.28.0 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +podman push --platform=/ --platform=/arm64 cluster:-k8s.v1.28.0 +podman build --build-arg=kube_version=v1.27.3 --tag=cluster:-k8s.v1.27.3 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +podman push --platform=/ --platform=/arm64 cluster:-k8s.v1.27.3 +podman build --build-arg=kube_version=v1.26.6 --tag=cluster:-k8s.v1.26.6 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +podman push --platform=/ --platform=/arm64 cluster:-k8s.v1.26.6 diff --git a/test/release/testdata/cross-cluster-image-podman.txt b/test/release/testdata/cross-cluster-image-podman.txt new file mode 100644 index 0000000000..d2e592991a --- /dev/null +++ b/test/release/testdata/cross-cluster-image-podman.txt @@ -0,0 +1,3 @@ +podman build --build-arg=kube_version=v1.28.0 --tag=cluster:-k8s.v1.28.0 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +podman build --build-arg=kube_version=v1.27.3 --tag=cluster:-k8s.v1.27.3 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . +podman build --build-arg=kube_version=v1.26.6 --tag=cluster:-k8s.v1.26.6 --platform=/ --platform=/arm64 -f ./images/cluster/Dockerfile . diff --git a/test/release/testdata/cross-cluster-image-with-push-staging.txt b/test/release/testdata/cross-cluster-image-with-push-staging.txt new file mode 100644 index 0000000000..3c54029481 --- /dev/null +++ b/test/release/testdata/cross-cluster-image-with-push-staging.txt @@ -0,0 +1,3 @@ +docker buildx build --build-arg=kube_version=v1.28.0 --tag=image-prefix/cluster:prefix--k8s.v1.28.0 --platform=/ --platform=/arm64 --push -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.27.3 --tag=image-prefix/cluster:prefix--k8s.v1.27.3 --platform=/ --platform=/arm64 --push -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.26.6 --tag=image-prefix/cluster:prefix--k8s.v1.26.6 --platform=/ --platform=/arm64 --push -f ./images/cluster/Dockerfile . diff --git a/test/release/testdata/cross-cluster-image-with-push.txt b/test/release/testdata/cross-cluster-image-with-push.txt new file mode 100644 index 0000000000..448d8e9761 --- /dev/null +++ b/test/release/testdata/cross-cluster-image-with-push.txt @@ -0,0 +1,3 @@ +docker buildx build --build-arg=kube_version=v1.28.0 --tag=cluster:-k8s.v1.28.0 --platform=/ --platform=/arm64 --push -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.27.3 --tag=cluster:-k8s.v1.27.3 --platform=/ --platform=/arm64 --push -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.26.6 --tag=cluster:-k8s.v1.26.6 --platform=/ --platform=/arm64 --push -f ./images/cluster/Dockerfile . diff --git a/test/release/testdata/cross-cluster-image.txt b/test/release/testdata/cross-cluster-image.txt new file mode 100644 index 0000000000..b09eee1194 --- /dev/null +++ b/test/release/testdata/cross-cluster-image.txt @@ -0,0 +1,3 @@ +docker buildx build --build-arg=kube_version=v1.28.0 --tag=cluster:-k8s.v1.28.0 --platform=/ --platform=/arm64 --load -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.27.3 --tag=cluster:-k8s.v1.27.3 --platform=/ --platform=/arm64 --load -f ./images/cluster/Dockerfile . +docker buildx build --build-arg=kube_version=v1.26.6 --tag=cluster:-k8s.v1.26.6 --platform=/ --platform=/arm64 --load -f ./images/cluster/Dockerfile . diff --git a/test/release/testdata/cross-image-nerdctl-with-push-staging.txt b/test/release/testdata/cross-image-nerdctl-with-push-staging.txt new file mode 100644 index 0000000000..102b81b6cd --- /dev/null +++ b/test/release/testdata/cross-image-nerdctl-with-push-staging.txt @@ -0,0 +1,2 @@ +nerdctl build --tag=image-prefix/kwok:prefix- --platform=/ --platform=/arm64 -f ./images/kwok/Dockerfile . +nerdctl push --platform=/ --platform=/arm64 image-prefix/kwok:prefix- diff --git a/test/release/testdata/cross-image-nerdctl-with-push.txt b/test/release/testdata/cross-image-nerdctl-with-push.txt new file mode 100644 index 0000000000..76c8d9a27d --- /dev/null +++ b/test/release/testdata/cross-image-nerdctl-with-push.txt @@ -0,0 +1,2 @@ +nerdctl build --tag=kwok: --platform=/ --platform=/arm64 -f ./images/kwok/Dockerfile . +nerdctl push --platform=/ --platform=/arm64 kwok: diff --git a/test/release/testdata/cross-image-nerdctl.txt b/test/release/testdata/cross-image-nerdctl.txt new file mode 100644 index 0000000000..1a787c29df --- /dev/null +++ b/test/release/testdata/cross-image-nerdctl.txt @@ -0,0 +1 @@ +nerdctl build --tag=kwok: --platform=/ --platform=/arm64 -f ./images/kwok/Dockerfile . diff --git a/test/release/testdata/cross-image-podman-with-push-staging.txt b/test/release/testdata/cross-image-podman-with-push-staging.txt new file mode 100644 index 0000000000..df5c3733bb --- /dev/null +++ b/test/release/testdata/cross-image-podman-with-push-staging.txt @@ -0,0 +1,2 @@ +podman build --tag=image-prefix/kwok:prefix- --platform=/ --platform=/arm64 -f ./images/kwok/Dockerfile . +podman push --platform=/ --platform=/arm64 image-prefix/kwok:prefix- diff --git a/test/release/testdata/cross-image-podman-with-push.txt b/test/release/testdata/cross-image-podman-with-push.txt new file mode 100644 index 0000000000..696b14dd38 --- /dev/null +++ b/test/release/testdata/cross-image-podman-with-push.txt @@ -0,0 +1,2 @@ +podman build --tag=kwok: --platform=/ --platform=/arm64 -f ./images/kwok/Dockerfile . +podman push --platform=/ --platform=/arm64 kwok: diff --git a/test/release/testdata/cross-image-podman.txt b/test/release/testdata/cross-image-podman.txt new file mode 100644 index 0000000000..8de2d9f9a5 --- /dev/null +++ b/test/release/testdata/cross-image-podman.txt @@ -0,0 +1 @@ +podman build --tag=kwok: --platform=/ --platform=/arm64 -f ./images/kwok/Dockerfile . diff --git a/test/release/testdata/cross-image-with-push-staging.txt b/test/release/testdata/cross-image-with-push-staging.txt new file mode 100644 index 0000000000..6a55f498b2 --- /dev/null +++ b/test/release/testdata/cross-image-with-push-staging.txt @@ -0,0 +1 @@ +docker buildx build --tag=kwok:prefix- --platform=/ --platform=/arm64 --push -f ./images/kwok/Dockerfile . diff --git a/test/release/testdata/cross-image-with-push.txt b/test/release/testdata/cross-image-with-push.txt new file mode 100644 index 0000000000..866563b7d8 --- /dev/null +++ b/test/release/testdata/cross-image-with-push.txt @@ -0,0 +1 @@ +docker buildx build --tag=kwok: --platform=/ --platform=/arm64 --push -f ./images/kwok/Dockerfile . diff --git a/test/release/testdata/cross-image.txt b/test/release/testdata/cross-image.txt new file mode 100644 index 0000000000..aec284b729 --- /dev/null +++ b/test/release/testdata/cross-image.txt @@ -0,0 +1 @@ +docker buildx build --tag=kwok: --platform=/ --platform=/arm64 --load -f ./images/kwok/Dockerfile . diff --git a/test/release/testdata/image-nerdctl-with-push-staging.txt b/test/release/testdata/image-nerdctl-with-push-staging.txt new file mode 100644 index 0000000000..5f481d9837 --- /dev/null +++ b/test/release/testdata/image-nerdctl-with-push-staging.txt @@ -0,0 +1,2 @@ +nerdctl build --tag=image-prefix/kwok:prefix- --platform=/ -f ./images/kwok/Dockerfile . +nerdctl push --platform=/ image-prefix/kwok:prefix- diff --git a/test/release/testdata/image-nerdctl-with-push.txt b/test/release/testdata/image-nerdctl-with-push.txt new file mode 100644 index 0000000000..e3111071d6 --- /dev/null +++ b/test/release/testdata/image-nerdctl-with-push.txt @@ -0,0 +1,2 @@ +nerdctl build --tag=kwok: --platform=/ -f ./images/kwok/Dockerfile . +nerdctl push --platform=/ kwok: diff --git a/test/release/testdata/image-nerdctl.txt b/test/release/testdata/image-nerdctl.txt new file mode 100644 index 0000000000..bd668b9b1d --- /dev/null +++ b/test/release/testdata/image-nerdctl.txt @@ -0,0 +1 @@ +nerdctl build --tag=kwok: --platform=/ -f ./images/kwok/Dockerfile . diff --git a/test/release/testdata/image-podman-with-push-staging.txt b/test/release/testdata/image-podman-with-push-staging.txt new file mode 100644 index 0000000000..a645782fc0 --- /dev/null +++ b/test/release/testdata/image-podman-with-push-staging.txt @@ -0,0 +1,2 @@ +podman build --tag=image-prefix/kwok:prefix- --platform=/ -f ./images/kwok/Dockerfile . +podman push --platform=/ image-prefix/kwok:prefix- diff --git a/test/release/testdata/image-podman-with-push.txt b/test/release/testdata/image-podman-with-push.txt new file mode 100644 index 0000000000..0e414d7b17 --- /dev/null +++ b/test/release/testdata/image-podman-with-push.txt @@ -0,0 +1,2 @@ +podman build --tag=kwok: --platform=/ -f ./images/kwok/Dockerfile . +podman push --platform=/ kwok: diff --git a/test/release/testdata/image-podman.txt b/test/release/testdata/image-podman.txt new file mode 100644 index 0000000000..23f64ee1e7 --- /dev/null +++ b/test/release/testdata/image-podman.txt @@ -0,0 +1 @@ +podman build --tag=kwok: --platform=/ -f ./images/kwok/Dockerfile . diff --git a/test/release/testdata/image-with-push-staging.txt b/test/release/testdata/image-with-push-staging.txt new file mode 100644 index 0000000000..8dd26ab419 --- /dev/null +++ b/test/release/testdata/image-with-push-staging.txt @@ -0,0 +1 @@ +docker buildx build --tag=image-prefix/kwok:prefix- --platform=/ --push -f ./images/kwok/Dockerfile . diff --git a/test/release/testdata/image-with-push.txt b/test/release/testdata/image-with-push.txt new file mode 100644 index 0000000000..628b929803 --- /dev/null +++ b/test/release/testdata/image-with-push.txt @@ -0,0 +1 @@ +docker buildx build --tag=kwok: --platform=/ --push -f ./images/kwok/Dockerfile . diff --git a/test/release/testdata/image.txt b/test/release/testdata/image.txt new file mode 100644 index 0000000000..80983d33d0 --- /dev/null +++ b/test/release/testdata/image.txt @@ -0,0 +1 @@ +docker buildx build --tag=kwok: --platform=/ --load -f ./images/kwok/Dockerfile . diff --git a/test/release/testdata/manifests-with-push-bucket.txt b/test/release/testdata/manifests-with-push-bucket.txt new file mode 100644 index 0000000000..7e882db2a4 --- /dev/null +++ b/test/release/testdata/manifests-with-push-bucket.txt @@ -0,0 +1,8 @@ +mkdir -p ./artifacts +cp -r ./kustomize ./artifacts/ +cd ./artifacts/kustomize/kwok +kustomize edit set image registry.k8s.io/kwok/kwok=image-prefix/kwok: +cd - +kustomize build ./artifacts/kustomize/kwok -o ./artifacts/kwok.yaml +gsutil cp -P ./artifacts/kwok.yaml bucket/releases/prefix-/manifests/kwok.yaml +rm -r ./artifacts/kustomize diff --git a/test/release/testdata/manifests-with-push-ghrelease.txt b/test/release/testdata/manifests-with-push-ghrelease.txt new file mode 100644 index 0000000000..74ded83e71 --- /dev/null +++ b/test/release/testdata/manifests-with-push-ghrelease.txt @@ -0,0 +1,8 @@ +mkdir -p ./artifacts +cp -r ./kustomize ./artifacts/ +cd ./artifacts/kustomize/kwok +kustomize edit set image registry.k8s.io/kwok/kwok=image-prefix/kwok: +cd - +kustomize build ./artifacts/kustomize/kwok -o ./artifacts/kwok.yaml +gh -R ghrelease release upload ./artifacts/kwok.yaml +rm -r ./artifacts/kustomize diff --git a/test/release/testdata/manifests.txt b/test/release/testdata/manifests.txt new file mode 100644 index 0000000000..9965fffc86 --- /dev/null +++ b/test/release/testdata/manifests.txt @@ -0,0 +1,7 @@ +mkdir -p ./artifacts +cp -r ./kustomize ./artifacts/ +cd ./artifacts/kustomize/kwok +kustomize edit set image registry.k8s.io/kwok/kwok=image-prefix/kwok: +cd - +kustomize build ./artifacts/kustomize/kwok -o ./artifacts/kwok.yaml +rm -r ./artifacts/kustomize