From e0bedb06d7f68182e85478a816c95074fbfe3618 Mon Sep 17 00:00:00 2001 From: StylusFrost Date: Fri, 24 Oct 2025 10:55:17 +0200 Subject: [PATCH] test(ci): update UI E2E tests workflow for Kubernetes integration - Modified the Kubernetes context in the UI E2E tests workflow to use a fixed context 'kind-kind' instead of a secret. - Added steps to create a Kind cluster and modify the kubeconfig for proper integration with the Kind cluster. - Updated the docker-compose configuration to include the Kind network, ensuring seamless connectivity with the Kubernetes cluster. --- .github/workflows/ui-e2e-tests.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ui-e2e-tests.yml b/.github/workflows/ui-e2e-tests.yml index 19b75403ae..627598379e 100644 --- a/.github/workflows/ui-e2e-tests.yml +++ b/.github/workflows/ui-e2e-tests.yml @@ -37,18 +37,26 @@ jobs: E2E_M365_SECRET_ID: ${{ secrets.E2E_M365_SECRET_ID }} E2E_M365_TENANT_ID: ${{ secrets.E2E_M365_TENANT_ID }} E2E_M365_CERTIFICATE_CONTENT: ${{ secrets.E2E_M365_CERTIFICATE_CONTENT }} - E2E_KUBERNETES_CONTEXT: ${{ secrets.E2E_KUBERNETES_CONTEXT }} + E2E_KUBERNETES_CONTEXT: 'kind-kind' E2E_KUBERNETES_KUBECONFIG_PATH: /home/runner/.kube/config - E2E_KUBERNETES_KUBECONFIG: ${{ secrets.E2E_KUBERNETES_KUBECONFIG }} E2E_NEW_PASSWORD: ${{ secrets.E2E_NEW_PASSWORD }} steps: - - name: create kubeconfig file - run: | - mkdir -p /home/runner/.kube - echo "$E2E_KUBERNETES_KUBECONFIG" > /home/runner/.kube/config - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Create k8s Kind Cluster + uses: helm/kind-action@v1 + - name: Modify kubeconfig + run: | + # Modify the kubeconfig to use the kind cluster server to https://kind-control-plane:6443 + # from worker service into docker-compose.yml + kubectl config set-cluster kind-kind --server=https://kind-control-plane:6443 + - name: Add network kind to docker compose + run: | + # Add the network kind to the docker compose to interconnect to kind cluster + yq -i '.networks.kind.external = true' docker-compose.yml + # Add network kind to worker service and default network too + yq -i '.services.worker.networks = ["kind","default"]' docker-compose.yml - name: Fix API data directory permissions run: docker run --rm -v $(pwd)/_data/api:/data alpine chown -R 1000:1000 /data - name: Start API services