Files
kubevela/makefiles/e2e.mk
Kanchan Dhamane bc15e5b359
Some checks failed
CodeQL / Analyze (go) (push) Failing after 1m43s
Definition-Lint / definition-doc (push) Failing after 6m13s
E2E MultiCluster Test / detect-noop (push) Successful in 24s
E2E Test / detect-noop (push) Successful in 17s
Go / detect-noop (push) Successful in 21s
license / Check for unapproved licenses (push) Failing after 2m38s
Registry / publish-core-images (push) Failing after 40s
Unit-Test / detect-noop (push) Successful in 20s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 1m55s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m18s
Go / staticcheck (push) Successful in 18m35s
Go / lint (push) Failing after 19m38s
Go / check-diff (push) Failing after 15m7s
Go / check-core-image-build (push) Failing after 3m45s
Go / check-cli-image-build (push) Failing after 2m23s
Unit-Test / unit-tests (push) Failing after 12m43s
Go / check-windows (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Failing after 48s
Feat: Semantic versioning support for Definitions (#6648)
* feature: Add Semantic versioning to KubeVela Definitions

Fixes https://github.com/kubevela/kubevela/issues/6435
Fixes https://github.com/kubevela/kubevela/issues/6534

Changes:
- Adds an optional "Version" field for all Definition Specs.
- Adds the following new validations to Webhooks for Definitions:
	- Validate the "Version" field follows Semantic versioning.
	- Dis-allow conflicting versioning fields ( Name annotation, Spec.Version)
- Adds the following new validations to Webhooks for Application:
	- Dis-allow the use of both the "publishVersion" & "autoUpdate" annotations.
- Enahnce "multiStageComponentApply" feature to support auto updates.

Boy Scout Changes:
- Fixes Plugin e2e tests broken by the fix for 6534.
- Fixes the dryRun and livediff commands to respect the "-n" namespace flag.
- Fixes the Application ValidationWebhook to respect the "-n" namespace flag.

Co-authored-by: Rahul Kumar <35751394+bugbounce@users.noreply.github.com>
Co-authored-by: Chaitanya Reddy <chaitanyareddy0702@gmail.com>
Co-authored-by: Vibhor Chinda <vibhorchinda@gmail.com>
Co-authored-by: Shivin Gopalani <gopalanishivin@gmail.com>

Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com>

* feature: Add KEP to define the proposal

Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com>

* fix: Rebase and fix merge conflicts

Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com>

* Fix: Adds unit test cases

Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com>

---------

Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com>
Co-authored-by: bugbounce <35751394+bugbounce@users.noreply.github.com>
2025-02-03 11:09:28 +08:00

114 lines
4.6 KiB
Makefile

.PHONY: e2e-setup-core-pre-hook
e2e-setup-core-pre-hook:
sh ./hack/e2e/modify_charts.sh
.PHONY: e2e-setup-core-post-hook
e2e-setup-core-post-hook:
kubectl wait --for=condition=Available deployment/kubevela-vela-core -n vela-system --timeout=180s
helm install kruise https://github.com/openkruise/charts/releases/download/kruise-1.1.0/kruise-1.1.0.tgz --set featureGates="PreDownloadImageForInPlaceUpdate=true" --set daemon.socketLocation=/run/k3s/containerd/
kill -9 $(lsof -it:9098) || true
go run ./e2e/addon/mock &
bin/vela addon enable ./e2e/addon/mock/testdata/fluxcd
bin/vela addon enable ./e2e/addon/mock/testdata/terraform
bin/vela addon enable ./e2e/addon/mock/testdata/terraform-alibaba ALICLOUD_ACCESS_KEY=xxx ALICLOUD_SECRET_KEY=yyy ALICLOUD_REGION=cn-beijing
timeout 600s bash -c -- 'while true; do kubectl get ns flux-system; if [ $$? -eq 0 ] ; then break; else sleep 5; fi;done'
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=vela-core,app.kubernetes.io/instance=kubevela -n vela-system --timeout=600s
kubectl wait --for=condition=Ready pod -l app=source-controller -n flux-system --timeout=600s
kubectl wait --for=condition=Ready pod -l app=helm-controller -n flux-system --timeout=600s
.PHONY: e2e-setup-core-wo-auth
e2e-setup-core-wo-auth:
helm upgrade --install \
--create-namespace \
--namespace vela-system \
--set image.pullPolicy=IfNotPresent \
--set image.repository=vela-core-test \
--set applicationRevisionLimit=5 \
--set controllerArgs.reSyncPeriod=1m \
--set optimize.disableComponentRevision=false \
--set image.tag=$(GIT_COMMIT) \
--set multicluster.clusterGateway.image.repository=ghcr.io/oam-dev/cluster-gateway \
--set admissionWebhooks.patch.image.repository=ghcr.io/oam-dev/kube-webhook-certgen/kube-webhook-certgen \
--wait kubevela ./charts/vela-core \
--debug
.PHONY: e2e-setup-core-w-auth
e2e-setup-core-w-auth:
helm upgrade --install \
--create-namespace \
--namespace vela-system \
--set image.pullPolicy=IfNotPresent \
--set image.repository=vela-core-test \
--set applicationRevisionLimit=5 \
--set optimize.disableComponentRevision=false \
--set image.tag=$(GIT_COMMIT) \
--wait kubevela \
./charts/vela-core \
--set authentication.enabled=true \
--set authentication.withUser=true \
--set authentication.groupPattern=* \
--set featureGates.zstdResourceTracker=true \
--set featureGates.zstdApplicationRevision=true \
--set featureGates.validateComponentWhenSharding=true \
--set multicluster.clusterGateway.enabled=true \
--set multicluster.clusterGateway.image.repository=ghcr.io/oam-dev/cluster-gateway \
--set admissionWebhooks.patch.image.repository=ghcr.io/oam-dev/kube-webhook-certgen/kube-webhook-certgen \
--set sharding.enabled=true \
--debug
kubectl get deploy kubevela-vela-core -oyaml -n vela-system | \
sed 's/schedulable-shards=/shard-id=shard-0/g' | \
sed 's/instance: kubevela/instance: kubevela-shard/g' | \
sed 's/shard-id: master/shard-id: shard-0/g' | \
sed 's/name: kubevela/name: kubevela-shard/g' | \
kubectl apply -f -
kubectl wait deployment -n vela-system kubevela-shard-vela-core --for condition=Available=True --timeout=90s
.PHONY: e2e-setup-core
e2e-setup-core: e2e-setup-core-pre-hook e2e-setup-core-wo-auth e2e-setup-core-post-hook
.PHONY: e2e-setup-core-auth
e2e-setup-core-auth: e2e-setup-core-pre-hook e2e-setup-core-w-auth e2e-setup-core-post-hook
.PHONY: e2e-api-test
e2e-api-test:
# Run e2e test
ginkgo -v -skipPackage capability,setup,application -r e2e
ginkgo -v -r e2e/application
.PHONY: e2e-test
e2e-test:
# Run e2e test
ginkgo -v ./test/e2e-test
@$(OK) tests pass
.PHONY: e2e-addon-test
e2e-addon-test:
cp bin/vela /tmp/
ginkgo -v ./test/e2e-addon-test
@$(OK) tests pass
.PHONY: e2e-multicluster-test
e2e-multicluster-test:
cd ./test/e2e-multicluster-test && go test -v -ginkgo.v -ginkgo.trace -coverpkg=./... -coverprofile=/tmp/e2e_multicluster_test.out
@$(OK) tests pass
.PHONY: e2e-cleanup
e2e-cleanup:
# Clean up
rm -rf ~/.vela
.PHONY: end-e2e-core
end-e2e-core:
sh ./hack/e2e/end_e2e_core.sh
.PHONY: end-e2e-core-shards
end-e2e-core-shards: end-e2e-core
CORE_NAME=kubevela-shard sh ./hack/e2e/end_e2e_core.sh
.PHONY: end-e2e
end-e2e:
sh ./hack/e2e/end_e2e.sh