From d5372e887e2e75da7f07858b155365dbbeb3a975 Mon Sep 17 00:00:00 2001 From: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com> Date: Tue, 17 Oct 2023 10:44:25 +0800 Subject: [PATCH] update GitHub flow for e2e test Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com> --- .github/workflows/main.yaml | 10 ++++++---- Makefile | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6fefc156..c1c4082c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -135,17 +135,19 @@ jobs: - name: Install OpenFunction run: | - # Install CRDs - make install kubectl apply -f https://openfunction.sh1a.qingstor.com/crds/gateway-api-v0.8.0.yaml # Install OpenFunction Chart helm repo add openfunction https://openfunction.github.io/charts/ helm repo update helm install openfunction openfunction/openfunction -n openfunction --create-namespace --devel -f "${GITHUB_WORKSPACE}"/.github/workflows/values + # Reinstall OpenFunction Controllers + make undeploy + sleep 20 + make deploy-e2e sleep 60 -# - name: Setup tmate session -# uses: mxschmitt/action-tmate@v1 + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v1 - name: Wait for kafka to be ready run: | diff --git a/Makefile b/Makefile index 44b90b0f..b0b373f0 100644 --- a/Makefile +++ b/Makefile @@ -131,6 +131,9 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/default | kubectl apply --server-side=true --force-conflicts -f - +deploy-e2e: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. + $(KUSTOMIZE) build config/default |sed -e 's#openfunction/openfunction:latest#kind-registry:5000/openfunction/openfunction:latest#g' |kubectl apply --server-side=true --force-conflicts -f - + undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/default | kubectl delete -f -