From 13f372102224e72aa00dad1565c8f859df7aa7f0 Mon Sep 17 00:00:00 2001 From: Damian Badura Date: Wed, 18 Dec 2024 13:48:39 +0100 Subject: [PATCH] revert changes related to ci --- .github/scripts/deploy_busola.sh | 38 ------------------- .github/scripts/prepare_kubeconfig.sh | 13 ------- .../workflows/pull-kyma-integration-tests.yml | 12 +++--- 3 files changed, 5 insertions(+), 58 deletions(-) delete mode 100755 .github/scripts/deploy_busola.sh delete mode 100755 .github/scripts/prepare_kubeconfig.sh diff --git a/.github/scripts/deploy_busola.sh b/.github/scripts/deploy_busola.sh deleted file mode 100755 index 70c64aecac..0000000000 --- a/.github/scripts/deploy_busola.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# This script install busola on k8s - -# standard bash error handling -set -o nounset # treat unset variables as an error and exit immediately. -set -o errexit # exit immediately when a command fails. -set -E # needs to be set if we want the ERR trap -set -o pipefail # prevents errors in a pipeline from being masked - -IMG_TAG=$1 - -#kubectl create configmap ENV #TODO: Fix it - -echo "### Deploying busola from: ${IMG_TAG}" - -cd resources -(cd base/web && kustomize edit set image busola-web=europe-docker.pkg.dev/kyma-project/prod/busola-web:"${IMG_TAG}") -(cd base/backend && kustomize edit set image busola-backend=europe-docker.pkg.dev/kyma-project/prod/busola-backend:"${IMG_TAG}") -kustomize build base/ | kubectl apply -f- - -kubectl apply -f ingress/ingress.yaml - -# WAIT FOR busola to be deployed -kubectl wait --for=condition=Available deployment/web -kubectl wait --for=condition=Available deployment/backend - -# return ip address busola and save it to output -IP=$(kubectl get ingress ingress-busola -ojson | jq .status.loadBalancer.ingress[].ip | tr -d '/"') - -echo "IP address: ${IP}" - -# check if busola is available with curl -curl --fail "${IP}" - -if [[ ! -z "${GITHUB_OUTPUT:-}" ]]; then - echo "IP=${IP}}" > "${GITHUB_OUTPUT}" - fi; \ No newline at end of file diff --git a/.github/scripts/prepare_kubeconfig.sh b/.github/scripts/prepare_kubeconfig.sh deleted file mode 100755 index 54eb856fba..0000000000 --- a/.github/scripts/prepare_kubeconfig.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# standard bash error handling -set -o nounset # treat unset variables as an error and exit immediately. -set -o errexit # exit immediately when a command fails. -set -E # needs to be set if we want the ERR trap -set -o pipefail # prevents errors in a pipeline from being masked - -IP=${1} -k3d kubeconfig get kyma > tests/integration/fixtures/kubeconfig.yaml - -#To access kubernetes inside the cluster change the api server addrees available inside the cluster -yq --inplace '.clusters[].cluster.server = "https://kubernetes.default.svc:443"' tests/integration/fixtures/kubeconfig.yaml diff --git a/.github/workflows/pull-kyma-integration-tests.yml b/.github/workflows/pull-kyma-integration-tests.yml index 678b9dc2a1..60fc82f6bc 100644 --- a/.github/workflows/pull-kyma-integration-tests.yml +++ b/.github/workflows/pull-kyma-integration-tests.yml @@ -32,20 +32,18 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20 - - name: deploy_busola + - name: setup_busola shell: bash - run: | - ./.github/scripts/deploy_busola.sh | tee busola-deploy.log + ./.github/scripts/setup-busola.sh | tee busola-build.log env: ENV: dev - - name: prepare_kubeconfig - run: | - prepare_kubeconfig.sh - name: run_tests shell: bash run: | - export CYPRESS_DOMAIN=http://${{steps.deploy_busola.IP}} + k3d kubeconfig get kyma > tests/integration/fixtures/kubeconfig.yaml + export CYPRESS_DOMAIN=http://localhost:3001 + cd tests/integration npm ci && npm run "test:kyma-e2e" - name: Uploads artifacts