From ee247815984e2dcf90ca0b03d7400729eeb5d5be Mon Sep 17 00:00:00 2001 From: Noel Georgi Date: Thu, 7 Mar 2024 23:02:29 +0530 Subject: [PATCH] chore: drop integration binary from releases. Drop integration binary from releases. Signed-off-by: Noel Georgi --- .github/workflows/ci.yaml | 8 ++-- .kres.yaml | 6 +-- Dockerfile | 38 +++++++++---------- Makefile | 32 ++++++++-------- .../main.go | 0 .../pkg/clientconfig/clientconfig.go | 0 .../pkg/clientconfig/register_key_debug.go | 0 .../pkg/clientconfig/register_key_no_debug.go | 0 .../pkg/tests/auth.go | 0 .../pkg/tests/backup.go | 0 .../pkg/tests/blocks.go | 0 .../pkg/tests/cleanup.go | 0 .../pkg/tests/cluster.go | 0 .../pkg/tests/common.go | 0 .../pkg/tests/config_patch.go | 0 .../pkg/tests/extensions.go | 0 .../pkg/tests/image.go | 0 .../pkg/tests/kubernetes.go | 0 .../pkg/tests/machines.go | 0 .../pkg/tests/omniconfig.go | 0 .../pkg/tests/rolling_update.go | 0 .../pkg/tests/siderolink.go | 0 .../pkg/tests/talos.go | 0 .../pkg/tests/template.go | 0 .../pkg/tests/testdata/cluster-1.tmpl.yaml | 0 .../pkg/tests/testdata/cluster-2.tmpl.yaml | 0 .../pkg/tests/tests.go | 0 .../pkg/tests/utils.go | 0 .../root.go | 0 internal/frontend/frontend.go | 2 +- 30 files changed, 43 insertions(+), 43 deletions(-) rename cmd/{omni-integration-test => integration-test}/main.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/clientconfig/clientconfig.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/clientconfig/register_key_debug.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/clientconfig/register_key_no_debug.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/auth.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/backup.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/blocks.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/cleanup.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/cluster.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/common.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/config_patch.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/extensions.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/image.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/kubernetes.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/machines.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/omniconfig.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/rolling_update.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/siderolink.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/talos.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/template.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/testdata/cluster-1.tmpl.yaml (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/testdata/cluster-2.tmpl.yaml (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/tests.go (100%) rename cmd/{omni-integration-test => integration-test}/pkg/tests/utils.go (100%) rename cmd/{omni-integration-test => integration-test}/root.go (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9f305fb4..048d5a10 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-02-28T11:30:58Z by kres latest. +# Generated on 2024-03-07T17:30:39Z by kres latest. name: default concurrency: @@ -76,6 +76,9 @@ jobs: - name: unit-tests-race run: | make unit-tests-race + - name: integration-test + run: | + make integration-test - name: omni run: | make omni @@ -104,9 +107,6 @@ jobs: PUSH: "true" run: | make image-omni TAG=latest - - name: omni-integration-test - run: | - make omni-integration-test - name: omnictl run: | make omnictl diff --git a/.kres.yaml b/.kres.yaml index c6595775..53d543ca 100644 --- a/.kres.yaml +++ b/.kres.yaml @@ -5,7 +5,7 @@ spec: disableImage: true --- kind: auto.CommandConfig -name: omni-integration-test +name: integration-test spec: disableImage: true --- @@ -144,7 +144,7 @@ spec: makefile: enabled: true depends: - - omni-integration-test-linux-amd64 + - integration-test-linux-amd64 - omnictl-linux-amd64 - omni-linux-amd64 script: @@ -272,7 +272,7 @@ spec: GOARCH: amd64 --- kind: golang.Build -name: omni-integration-test +name: integration-test spec: outputs: linux-amd64: diff --git a/Dockerfile b/Dockerfile index a2af04e8..11321a50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -# syntax = docker/dockerfile-upstream:1.6.0-labs +# syntax = docker/dockerfile-upstream:1.7.0-labs # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-02-26T21:35:48Z by kres latest. +# Generated on 2024-03-07T17:30:39Z by kres latest. ARG JS_TOOLCHAIN ARG TOOLCHAIN @@ -329,20 +329,20 @@ COPY --from=unit-tests-client-run /src/client/coverage.txt /coverage-unit-tests- FROM scratch AS unit-tests COPY --from=unit-tests-run /src/coverage.txt /coverage-unit-tests.txt -# builds omni-darwin-amd64 -FROM base AS omni-darwin-amd64-build +# builds integration-test-linux-amd64 +FROM base AS integration-test-linux-amd64-build COPY --from=generate / / COPY --from=embed-generate / / -WORKDIR /src/cmd/omni +WORKDIR /src/cmd/integration-test ARG GO_BUILDFLAGS ARG GO_LDFLAGS ARG VERSION_PKG="internal/version" ARG SHA ARG TAG -RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=amd64 GOOS=darwin go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS} -X ${VERSION_PKG}.Name=omni -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /omni-darwin-amd64 +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=amd64 GOOS=linux go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS} -X ${VERSION_PKG}.Name=integration-test -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /integration-test-linux-amd64 -# builds omni-darwin-arm64 -FROM base AS omni-darwin-arm64-build +# builds omni-darwin-amd64 +FROM base AS omni-darwin-amd64-build COPY --from=generate / / COPY --from=embed-generate / / WORKDIR /src/cmd/omni @@ -351,19 +351,19 @@ ARG GO_LDFLAGS ARG VERSION_PKG="internal/version" ARG SHA ARG TAG -RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=arm64 GOOS=darwin go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS} -X ${VERSION_PKG}.Name=omni -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /omni-darwin-arm64 +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=amd64 GOOS=darwin go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS} -X ${VERSION_PKG}.Name=omni -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /omni-darwin-amd64 -# builds omni-integration-test-linux-amd64 -FROM base AS omni-integration-test-linux-amd64-build +# builds omni-darwin-arm64 +FROM base AS omni-darwin-arm64-build COPY --from=generate / / COPY --from=embed-generate / / -WORKDIR /src/cmd/omni-integration-test +WORKDIR /src/cmd/omni ARG GO_BUILDFLAGS ARG GO_LDFLAGS ARG VERSION_PKG="internal/version" ARG SHA ARG TAG -RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=amd64 GOOS=linux go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS} -X ${VERSION_PKG}.Name=omni-integration-test -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /omni-integration-test-linux-amd64 +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=arm64 GOOS=darwin go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS} -X ${VERSION_PKG}.Name=omni -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /omni-darwin-arm64 # builds omni-linux-amd64 FROM base AS omni-linux-amd64-build @@ -449,15 +449,15 @@ ARG SHA ARG TAG RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=amd64 GOOS=windows go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS} -X ${VERSION_PKG}.Name=omnictl -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /omnictl-windows-amd64.exe +FROM scratch AS integration-test-linux-amd64 +COPY --from=integration-test-linux-amd64-build /integration-test-linux-amd64 /integration-test-linux-amd64 + FROM scratch AS omni-darwin-amd64 COPY --from=omni-darwin-amd64-build /omni-darwin-amd64 /omni-darwin-amd64 FROM scratch AS omni-darwin-arm64 COPY --from=omni-darwin-arm64-build /omni-darwin-arm64 /omni-darwin-arm64 -FROM scratch AS omni-integration-test-linux-amd64 -COPY --from=omni-integration-test-linux-amd64-build /omni-integration-test-linux-amd64 /omni-integration-test-linux-amd64 - FROM scratch AS omni-linux-amd64 COPY --from=omni-linux-amd64-build /omni-linux-amd64 /omni-linux-amd64 @@ -479,10 +479,10 @@ COPY --from=omnictl-linux-arm64-build /omnictl-linux-arm64 /omnictl-linux-arm64 FROM scratch AS omnictl-windows-amd64.exe COPY --from=omnictl-windows-amd64.exe-build /omnictl-windows-amd64.exe /omnictl-windows-amd64.exe -FROM omni-integration-test-linux-${TARGETARCH} AS omni-integration-test +FROM integration-test-linux-${TARGETARCH} AS integration-test -FROM scratch AS omni-integration-test-all -COPY --from=omni-integration-test-linux-amd64 / / +FROM scratch AS integration-test-all +COPY --from=integration-test-linux-amd64 / / FROM omni-linux-${TARGETARCH} AS omni diff --git a/Makefile b/Makefile index bc546a6b..ef02efdb 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2024-02-26T21:35:48Z by kres latest. +# Generated on 2024-03-07T17:30:39Z by kres latest. # common variables @@ -17,15 +17,15 @@ REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME) PROTOBUF_GRPC_GATEWAY_TS_VERSION ?= 1.2.1 TESTPKGS ?= ./... NODE_BUILD_ARGS ?= -PROTOBUF_GO_VERSION ?= 1.32.0 +PROTOBUF_GO_VERSION ?= 1.33.0 GRPC_GO_VERSION ?= 1.3.0 GRPC_GATEWAY_VERSION ?= 2.19.1 VTPROTOBUF_VERSION ?= 0.6.0 DEEPCOPY_VERSION ?= v0.5.6 GOLANGCILINT_VERSION ?= v1.56.2 GOFUMPT_VERSION ?= v0.6.0 -GO_VERSION ?= 1.22.0 -GOIMPORTS_VERSION ?= v0.18.0 +GO_VERSION ?= 1.22.1 +GOIMPORTS_VERSION ?= v0.19.0 GO_BUILDFLAGS ?= GO_LDFLAGS ?= CGO_ENABLED ?= 0 @@ -138,7 +138,7 @@ else GO_LDFLAGS += -s endif -all: unit-tests-frontend lint-eslint frontend unit-tests-client unit-tests omni image-omni omni-integration-test omnictl dev-server docker-compose-up docker-compose-down mkcert-install mkcert-generate mkcert-uninstall run-integration-test lint +all: unit-tests-frontend lint-eslint frontend unit-tests-client unit-tests integration-test omni image-omni omnictl dev-server docker-compose-up docker-compose-down mkcert-install mkcert-generate mkcert-uninstall run-integration-test lint .PHONY: clean clean: ## Cleans up all artifacts. @@ -226,6 +226,16 @@ unit-tests: ## Performs unit tests unit-tests-race: ## Performs unit tests with race detection enabled. @$(MAKE) target-$@ +.PHONY: $(ARTIFACTS)/integration-test-linux-amd64 +$(ARTIFACTS)/integration-test-linux-amd64: + @$(MAKE) local-integration-test-linux-amd64 DEST=$(ARTIFACTS) + +.PHONY: integration-test-linux-amd64 +integration-test-linux-amd64: $(ARTIFACTS)/integration-test-linux-amd64 ## Builds executable for integration-test-linux-amd64. + +.PHONY: integration-test +integration-test: integration-test-linux-amd64 ## Builds executables for integration-test. + .PHONY: $(ARTIFACTS)/omni-darwin-amd64 $(ARTIFACTS)/omni-darwin-amd64: @$(MAKE) local-omni-darwin-amd64 DEST=$(ARTIFACTS) @@ -268,16 +278,6 @@ lint: lint-golangci-lint-client lint-gofumpt-client lint-govulncheck-client lint image-omni: ## Builds image for omni. @$(MAKE) target-$@ TARGET_ARGS="--tag=$(REGISTRY)/$(USERNAME)/omni:$(TAG)" -.PHONY: $(ARTIFACTS)/omni-integration-test-linux-amd64 -$(ARTIFACTS)/omni-integration-test-linux-amd64: - @$(MAKE) local-omni-integration-test-linux-amd64 DEST=$(ARTIFACTS) - -.PHONY: omni-integration-test-linux-amd64 -omni-integration-test-linux-amd64: $(ARTIFACTS)/omni-integration-test-linux-amd64 ## Builds executable for omni-integration-test-linux-amd64. - -.PHONY: omni-integration-test -omni-integration-test: omni-integration-test-linux-amd64 ## Builds executables for omni-integration-test. - .PHONY: $(ARTIFACTS)/omnictl-darwin-amd64 $(ARTIFACTS)/omnictl-darwin-amd64: @$(MAKE) local-omnictl-darwin-amd64 DEST=$(ARTIFACTS) @@ -340,7 +340,7 @@ mkcert-generate: mkcert-uninstall: go run ./hack/generate-certs uninstall -run-integration-test: omni-integration-test-linux-amd64 omnictl-linux-amd64 omni-linux-amd64 +run-integration-test: integration-test-linux-amd64 omnictl-linux-amd64 omni-linux-amd64 @hack/test/integration.sh .PHONY: rekres diff --git a/cmd/omni-integration-test/main.go b/cmd/integration-test/main.go similarity index 100% rename from cmd/omni-integration-test/main.go rename to cmd/integration-test/main.go diff --git a/cmd/omni-integration-test/pkg/clientconfig/clientconfig.go b/cmd/integration-test/pkg/clientconfig/clientconfig.go similarity index 100% rename from cmd/omni-integration-test/pkg/clientconfig/clientconfig.go rename to cmd/integration-test/pkg/clientconfig/clientconfig.go diff --git a/cmd/omni-integration-test/pkg/clientconfig/register_key_debug.go b/cmd/integration-test/pkg/clientconfig/register_key_debug.go similarity index 100% rename from cmd/omni-integration-test/pkg/clientconfig/register_key_debug.go rename to cmd/integration-test/pkg/clientconfig/register_key_debug.go diff --git a/cmd/omni-integration-test/pkg/clientconfig/register_key_no_debug.go b/cmd/integration-test/pkg/clientconfig/register_key_no_debug.go similarity index 100% rename from cmd/omni-integration-test/pkg/clientconfig/register_key_no_debug.go rename to cmd/integration-test/pkg/clientconfig/register_key_no_debug.go diff --git a/cmd/omni-integration-test/pkg/tests/auth.go b/cmd/integration-test/pkg/tests/auth.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/auth.go rename to cmd/integration-test/pkg/tests/auth.go diff --git a/cmd/omni-integration-test/pkg/tests/backup.go b/cmd/integration-test/pkg/tests/backup.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/backup.go rename to cmd/integration-test/pkg/tests/backup.go diff --git a/cmd/omni-integration-test/pkg/tests/blocks.go b/cmd/integration-test/pkg/tests/blocks.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/blocks.go rename to cmd/integration-test/pkg/tests/blocks.go diff --git a/cmd/omni-integration-test/pkg/tests/cleanup.go b/cmd/integration-test/pkg/tests/cleanup.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/cleanup.go rename to cmd/integration-test/pkg/tests/cleanup.go diff --git a/cmd/omni-integration-test/pkg/tests/cluster.go b/cmd/integration-test/pkg/tests/cluster.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/cluster.go rename to cmd/integration-test/pkg/tests/cluster.go diff --git a/cmd/omni-integration-test/pkg/tests/common.go b/cmd/integration-test/pkg/tests/common.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/common.go rename to cmd/integration-test/pkg/tests/common.go diff --git a/cmd/omni-integration-test/pkg/tests/config_patch.go b/cmd/integration-test/pkg/tests/config_patch.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/config_patch.go rename to cmd/integration-test/pkg/tests/config_patch.go diff --git a/cmd/omni-integration-test/pkg/tests/extensions.go b/cmd/integration-test/pkg/tests/extensions.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/extensions.go rename to cmd/integration-test/pkg/tests/extensions.go diff --git a/cmd/omni-integration-test/pkg/tests/image.go b/cmd/integration-test/pkg/tests/image.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/image.go rename to cmd/integration-test/pkg/tests/image.go diff --git a/cmd/omni-integration-test/pkg/tests/kubernetes.go b/cmd/integration-test/pkg/tests/kubernetes.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/kubernetes.go rename to cmd/integration-test/pkg/tests/kubernetes.go diff --git a/cmd/omni-integration-test/pkg/tests/machines.go b/cmd/integration-test/pkg/tests/machines.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/machines.go rename to cmd/integration-test/pkg/tests/machines.go diff --git a/cmd/omni-integration-test/pkg/tests/omniconfig.go b/cmd/integration-test/pkg/tests/omniconfig.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/omniconfig.go rename to cmd/integration-test/pkg/tests/omniconfig.go diff --git a/cmd/omni-integration-test/pkg/tests/rolling_update.go b/cmd/integration-test/pkg/tests/rolling_update.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/rolling_update.go rename to cmd/integration-test/pkg/tests/rolling_update.go diff --git a/cmd/omni-integration-test/pkg/tests/siderolink.go b/cmd/integration-test/pkg/tests/siderolink.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/siderolink.go rename to cmd/integration-test/pkg/tests/siderolink.go diff --git a/cmd/omni-integration-test/pkg/tests/talos.go b/cmd/integration-test/pkg/tests/talos.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/talos.go rename to cmd/integration-test/pkg/tests/talos.go diff --git a/cmd/omni-integration-test/pkg/tests/template.go b/cmd/integration-test/pkg/tests/template.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/template.go rename to cmd/integration-test/pkg/tests/template.go diff --git a/cmd/omni-integration-test/pkg/tests/testdata/cluster-1.tmpl.yaml b/cmd/integration-test/pkg/tests/testdata/cluster-1.tmpl.yaml similarity index 100% rename from cmd/omni-integration-test/pkg/tests/testdata/cluster-1.tmpl.yaml rename to cmd/integration-test/pkg/tests/testdata/cluster-1.tmpl.yaml diff --git a/cmd/omni-integration-test/pkg/tests/testdata/cluster-2.tmpl.yaml b/cmd/integration-test/pkg/tests/testdata/cluster-2.tmpl.yaml similarity index 100% rename from cmd/omni-integration-test/pkg/tests/testdata/cluster-2.tmpl.yaml rename to cmd/integration-test/pkg/tests/testdata/cluster-2.tmpl.yaml diff --git a/cmd/omni-integration-test/pkg/tests/tests.go b/cmd/integration-test/pkg/tests/tests.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/tests.go rename to cmd/integration-test/pkg/tests/tests.go diff --git a/cmd/omni-integration-test/pkg/tests/utils.go b/cmd/integration-test/pkg/tests/utils.go similarity index 100% rename from cmd/omni-integration-test/pkg/tests/utils.go rename to cmd/integration-test/pkg/tests/utils.go diff --git a/cmd/omni-integration-test/root.go b/cmd/integration-test/root.go similarity index 100% rename from cmd/omni-integration-test/root.go rename to cmd/integration-test/root.go diff --git a/internal/frontend/frontend.go b/internal/frontend/frontend.go index 98b4939b..7febf44e 100644 --- a/internal/frontend/frontend.go +++ b/internal/frontend/frontend.go @@ -5,7 +5,7 @@ // THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. // -// Generated on 2024-02-28T17:18:34Z by kres latest. +// Generated on 2024-03-07T17:30:39Z by kres latest. package frontend