File tree Expand file tree Collapse file tree 9 files changed +67
-27
lines changed
Expand file tree Collapse file tree 9 files changed +67
-27
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # This script install busola on k8s
4+
5+ # standard bash error handling
6+ set -o nounset # treat unset variables as an error and exit immediately.
7+ set -o errexit # exit immediately when a command fails.
8+ set -E # needs to be set if we want the ERR trap
9+ set -o pipefail # prevents errors in a pipeline from being masked
10+
11+ IMG_TAG=$1
12+
13+ # kubectl create configmap ENV #TODO: Fix it
14+
15+ echo " ### Deploying busola from: ${IMG_TAG} "
16+
17+ cd resources
18+ (cd base/web && kustomize edit set image busola-web=europe-docker.pkg.dev/kyma-project/prod/busola-web:" ${IMG_TAG} " )
19+ (cd base/backend && kustomize edit set image busola-backend=europe-docker.pkg.dev/kyma-project/prod/busola-backend:" ${IMG_TAG} " )
20+ kustomize build base/ | kubectl apply -f-
21+
22+ kubectl apply -f ingress/ingress.yaml
23+
24+ # WAIT FOR busola to be deployed
25+ kubectl wait --for=condition=Available deployment/web
26+ kubectl wait --for=condition=Available deployment/backend
27+
28+ # return ip address busola and save it to output
29+ IP=$( kubectl get ingress ingress-busola -ojson | jq .status.loadBalancer.ingress[].ip | tr -d ' /"' )
30+
31+ echo " IP address: ${IP} "
32+
33+ # check if busola is available with curl
34+ curl --fail " ${IP} "
35+
36+ if [[ ! -z " ${GITHUB_OUTPUT:- } " ]]; then
37+ echo " IP=${IP} }" > " ${GITHUB_OUTPUT} "
38+ fi ;
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # standard bash error handling
4+ set -o nounset # treat unset variables as an error and exit immediately.
5+ set -o errexit # exit immediately when a command fails.
6+ set -E # needs to be set if we want the ERR trap
7+ set -o pipefail # prevents errors in a pipeline from being masked
8+
9+ IP=${1}
10+ k3d kubeconfig get kyma > tests/integration/fixtures/kubeconfig.yaml
11+
12+ # To access kubernetes inside the cluster change the api server addrees available inside the cluster
13+ yq --inplace ' .clusters[].cluster.server = "https://kubernetes.default.svc:443"' tests/integration/fixtures/kubeconfig.yaml
Original file line number Diff line number Diff line change @@ -32,18 +32,20 @@ jobs:
3232 - uses : actions/setup-node@v4
3333 with :
3434 node-version : 20
35- - name : setup_busola
35+ - name : deploy_busola
3636 shell : bash
37+
3738 run : |
38- ./.github/scripts/setup-busola .sh | tee busola-build .log
39+ ./.github/scripts/deploy_busola .sh | tee busola-deploy .log
3940 env :
4041 ENV : dev
42+ - name : prepare_kubeconfig
43+ run : |
44+ prepare_kubeconfig.sh
4145 - name : run_tests
4246 shell : bash
4347 run : |
44- k3d kubeconfig get kyma > tests/integration/fixtures/kubeconfig.yaml
45- export CYPRESS_DOMAIN=http://localhost:3001
46-
48+ export CYPRESS_DOMAIN=http://${{steps.deploy_busola.IP}}
4749 cd tests/integration
4850 npm ci && npm run "test:kyma-e2e"
4951 - name : Uploads artifacts
Original file line number Diff line number Diff line change 4141 env :
4242 - name : ADDRESS
4343 value : 0.0.0.0
44- - name : NODE_ENV
45- valueFrom :
46- configMapKeyRef :
47- optional : true
48- key : NODE_ENV
49- name : busola-backend-config
5044 volumeMounts :
5145 - name : config
5246 mountPath : /app/config
Original file line number Diff line number Diff line change @@ -4,3 +4,7 @@ resources:
44 - deployment.yaml
55 - hpa.yaml
66 - service.yaml
7+ images :
8+ - name : busola-backend
9+ newName : europe-docker.pkg.dev/kyma-project/prod/busola-backend
10+ newTag : v0.0.1
Original file line number Diff line number Diff line change 1717 containers :
1818 - name : busola
1919 image : busola-web
20- imagePullPolicy : Always
20+ imagePullPolicy : IfNotPresent
2121 env :
2222 - name : ENVIRONMENT
2323 valueFrom :
Original file line number Diff line number Diff line change @@ -5,3 +5,7 @@ resources:
55 - deployment.yaml
66 - hpa.yaml
77 - service.yaml
8+ images :
9+ - name : busola-web
10+ newName : europe-docker.pkg.dev/kyma-project/prod/busola-web
11+ newTag : v0.0.1
Original file line number Diff line number Diff line change @@ -2,11 +2,6 @@ kind: Ingress
22apiVersion : networking.k8s.io/v1
33metadata :
44 name : ingress-busola
5- annotations :
6- nginx.ingress.kubernetes.io/rewrite-target : /$1
7- nginx.ingress.kubernetes.io/force-ssl-redirect : ' true'
8- nginx.ingress.kubernetes.io/server-snippet : ' server_tokens off;' # hide nginx version
9- nginx.ingress.kubernetes.io/enable-cors : ' false'
105spec :
116 rules :
127 - http :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments