Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache issues 1584 kind #38

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion packages/kn-plugin-workflow/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ SET_VERSION := $(METADATA_PATH).PluginVersion=$(PLUGIN_VERSION
SET_KOGITO_VERSION := $(METADATA_PATH).KogitoVersion=$(KOGITO_VERSION)
LDFLAGS := "-X $(SET_QUARKUS_PLATFORM_GROUP_ID) -X $(SET_QUARKUS_VERSION) -X $(SET_VERSION) -X $(SET_DEV_MODE_IMAGE) -X $(SET_KOGITO_VERSION)"

KIND_VERSION ?= v0.20.0

ARCH := $(shell uname -m)
ifeq ($(ARCH),arm64)
GOARCH = arm64
Expand Down Expand Up @@ -61,4 +63,38 @@ build-win32-amd64:

clean:
go clean
rm -rf $(BIN_PATH) $(TEST_PATH)
rm -rf $(BIN_PATH) $(TEST_PATH)

.PHONY: test-e2e
test-e2e:
@$(MAKE) install-kind
@$(MAKE) create-cluster
@$(MAKE) install-operator
@$(MAKE) go-test-e2e
@$(MAKE) go-test-e2e-report


.PHONY: install-kind
install-kind:
command -v kind >/dev/null || go install sigs.k8s.io/kind@$(KIND_VERSION)

.PHONY: create-cluster
create-cluster: install-kind
kind create cluster

.PHONY: install-operator
install-operator:
kubectl create -f ../sonataflow-operator/operator.yaml

.PHONY: go-test-e2e
go-test-e2e:
rm -rf dist-tests-e2e
mkdir dist-tests-e2e
go test -v ./e2e-tests/... -tags e2e_tests -timeout 20m 2>&1 | tee ./dist-tests-e2e/go-test-output-e2e.txt

.PHONY: go-test-e2e-report
go-test-e2e-report:
go run github.com/jstemmer/go-junit-report/v2 \
-set-exit-code \
-in ./dist-tests-e2e/go-test-output-e2e.txt \
-out ./dist-tests-e2e/junit-report-it.xml
2 changes: 1 addition & 1 deletion packages/kn-plugin-workflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"setup:env": "cross-env QUARKUS_PLATFORM_GROUP_ID=$(build-env knPluginWorkflow.quarkusPlatformGroupId) QUARKUS_VERSION=$(build-env versions.quarkus) PLUGIN_VERSION=$(build-env knPluginWorkflow.version) DEV_MODE_IMAGE_URL=$(build-env knPluginWorkflow.devModeImageUrl) KOGITO_VERSION=$(build-env versions.kogito)",
"setup:env:win32": "pnpm powershell \"cross-env QUARKUS_PLATFORM_GROUP_ID=$(build-env knPluginWorkflow.quarkusPlatformGroupId) QUARKUS_VERSION=$(build-env versions.quarkus) DEV_MODE_IMAGE_URL=$(build-env knPluginWorkflow.devModeImageUrl) KOGITO_VERSION=$(build-env versions.kogito) PLUGIN_VERSION=$(build-env knPluginWorkflow.version)\"",
"test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"pnpm go:test\" \"pnpm go:test:report\"",
"test-e2e": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm go:test-e2e\" \"pnpm go:test-e2e:report\"",
"test-e2e": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"make test-e2e\"",
"test-e2e:logs": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm go:test-e2e:logs\" \"pnpm go:test-e2e:report\"",
"test-e2e:not:quarkus": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm go:test-e2e:not:quarkus\" \"pnpm go:test-e2e:report\"",
"test-e2e:not:quarkus:logs": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm go:test-e2e:not:quarkus:logs\" \"pnpm go:test-e2e:report\"",
Expand Down
Loading