Skip to content

Instantly share code, notes, and snippets.

@thiagoelg
Created April 24, 2024 23:20
Show Gist options
  • Save thiagoelg/c65d9d71e34d6cd8c8725f522c705e20 to your computer and use it in GitHub Desktop.
Save thiagoelg/c65d9d71e34d6cd8c8725f522c705e20 to your computer and use it in GitHub Desktop.
kogito-serverless-operator Makefile diff
diff --git a/../kogito-serverless-operator/Makefile b/packages/kogito-serverless-operator/Makefile
index ce87602d80c..0e7c5ca56b4 100644
--- a/../kogito-serverless-operator/Makefile
+++ b/packages/kogito-serverless-operator/Makefile
@@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
-VERSION ?= 999.0.0-snapshot
+VERSION ?= 0.0.0
REDUCED_VERSION ?= latest
# CHANNELS define the bundle channels used in the bundle.
@@ -42,7 +42,7 @@ BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(REDUCED_VERSION)
BUNDLE_GEN_FLAGS ?= -q --overwrite=false --version $(VERSION) $(BUNDLE_METADATA_OPTS)
# Container runtime engine used for building the images
-BUILDER ?= podman
+BUILDER ?= docker
# USE_IMAGE_DIGESTS defines if images are resolved via tags or digests
# You can enable this value if you would like to use SHA Based Digests
@@ -99,7 +99,7 @@ manifests: generate ## Generate WebhookConfiguration, ClusterRole and CustomReso
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:allowDangerousTypes=true webhook paths="./api/..." paths="./controllers/..." output:crd:artifacts:config=config/crd/bases
.PHONY: generate
-generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
+generate: controller-gen fmt ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./api/..." paths="./container-builder/api/..."
.PHONY: fmt
@@ -114,7 +114,7 @@ vet: ## Run go vet against code.
go vet ./...
.PHONY: test
-test: manifests generate envtest vet fmt test-api ## Run tests.
+test: manifests generate envtest vet fmt test-api test-workflowproj test-container-builder ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $(shell go list ./... | grep -v /test/) -coverprofile cover.out
.PHONY: test-api
@@ -145,7 +145,7 @@ test-workflowproj:
##@ Build
.PHONY: build
-build: generate ## Build manager binary.
+build: generate-all ## Build manager binary.
CGO_ENABLED=0 go build -trimpath -ldflags=-buildid= -o bin/manager main.go
.PHONY: build-4-debug
@@ -350,4 +350,13 @@ create-cluster: install-kind
.PHONY: delete-cluster
delete-cluster: install-kind
- kind delete cluster && docker rm -f kind-registry
\ No newline at end of file
+ kind delete cluster && docker rm -f kind-registry
+
+.PHONY: load-docker-image
+load-docker-image: install-kind
+ kind load docker-image $(IMG)
+
+.PHONY: full-test-e2e
+full-test-e2e: create-cluster load-docker-image deploy
+ kubectl wait pod -A -l control-plane=sonataflow-operator --for condition=Ready --timeout 120s
+ go test ./test/e2e/* -v -ginkgo.v -ginkgo.no-color -ginkgo.junit-report=./e2e-test-report.xml -timeout 60m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment