Skip to content

Commit 094e916

Browse files
Merge branch 'main' into bump-monaco
2 parents 61645ba + cc25f12 commit 094e916

File tree

186 files changed

+9096
-7296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+9096
-7296
lines changed
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# This script install busola on k8s
3+
# Installs busola on k8s
44

55
# standard bash error handling
66
set -o nounset # treat unset variables as an error and exit immediately.
@@ -14,18 +14,20 @@ print_k8s_resources()
1414
{
1515
kubectl get all
1616
kubectl get deployment -oyaml
17+
kubectl get pod -oyaml
18+
kubectl logs deployments/busola
19+
kubectl describe pod --selector app=busola
1720
}
1821

1922
ENV=${ENV?"env is not set"}
20-
IMG_TAG=$1
21-
IMG_DIR=${IMG_DIR:-"dev"}
23+
IMG=$1
2224

2325
kubectl delete configmap environment --ignore-not-found=true
2426
kubectl create configmap environment --from-literal=ENVIRONMENT="${ENV}"
25-
echo "### Deploying busola from: ${IMG_DIR}/${IMG_TAG}"
27+
echo "### Deploying busola from: ${IMG}"
2628

2729
cd resources
28-
(cd base && kustomize edit set image busola=europe-docker.pkg.dev/kyma-project/"${IMG_DIR}"/busola:"${IMG_TAG}")
30+
(cd base && kustomize edit set image busola="${IMG}")
2931
kustomize build base/ | kubectl apply -f-
3032

3133
kubectl apply -f ingress/ingress.yaml

.github/scripts/install-kyma.sh

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
11
#!/bin/bash
22

3-
set -e
3+
# Deploys all Kyma related resources
44

5-
APPLICATION_CONNECTOR_VERSION="1.1.3"
6-
OS="$(uname -s | tr 'A-Z' 'a-z')"
7-
echo "Using OS:" "${OS}"
8-
9-
if [ ! -f "./bin/kyma" ]; then
10-
echo "Kyma CLI Download is starting"
11-
mkdir -p ./bin
12-
curl -Lo ./bin/kyma https://storage.googleapis.com/kyma-cli-unstable/kyma-"${OS}"
13-
chmod +x ./bin/kyma
14-
echo "Kyma CLI Download finished"
15-
fi
5+
set -o nounset # treat unset variables as an error and exit immediately.
6+
set -o errexit # exit immediately when a command fails.
7+
set -E # needs to be set if we want the ERR trap
8+
set -o pipefail # prevents errors in a pipeline from being masked
169

1710
# Create if not exist
1811
kubectl get ns kyma-system || kubectl create ns kyma-system
1912
kubectl get ns kcp-system || kubectl create ns kcp-system
2013

21-
# ./bin/kyma alpha deploy
22-
2314
echo "Apply and enable keda module"
2415
kubectl apply -f https://github.com/kyma-project/keda-manager/releases/latest/download/keda-manager.yaml
2516
kubectl apply -f https://github.com/kyma-project/keda-manager/releases/latest/download/keda-default-cr.yaml
@@ -37,6 +28,7 @@ kubectl apply -f https://github.com/kyma-project/istio/releases/latest/download/
3728
kubectl apply -f https://github.com/kyma-project/istio/releases/latest/download/istio-default-cr.yaml
3829

3930
echo "Apply application connector"
31+
APPLICATION_CONNECTOR_VERSION="1.1.3"
4032
kubectl apply -f https://github.com/kyma-project/application-connector-manager/releases/download/${APPLICATION_CONNECTOR_VERSION}/application-connector-manager.yaml
4133
kubectl apply -f https://github.com/kyma-project/application-connector-manager/releases/download/${APPLICATION_CONNECTOR_VERSION}/default_application_connector_cr.yaml
4234

.github/scripts/prepare_kubeconfig.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
# Prepares kubeconfig to be used on the same cluster with busola installed on it.
4+
35
# standard bash error handling
46
set -o nounset # treat unset variables as an error and exit immediately.
57
set -o errexit # exit immediately when a command fails.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# Creates K3d with container registry on port 5000.
4+
5+
set -o nounset # treat unset variables as an error and exit immediately.
6+
set -o errexit # exit immediately when a command fails.
7+
set -E # needs to be set if we want the ERR trap
8+
set -o pipefail # prevents errors in a pipeline from being masked
9+
10+
echo "Provisioning k3d cluster for Kyma"
11+
k3d registry create kyma-registry.localhost --port 5000
12+
13+
# kyma alpha deploy command expects a cluster with an internal k3d registry, so we provide one
14+
k3d cluster create kyma --kubeconfig-switch-context -p 80:80@loadbalancer -p 443:443@loadbalancer --registry-use k3d-kyma-registry.localhost:5000

.github/scripts/provision_kyma_k3d.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/scripts/setup-busola.sh renamed to .github/scripts/run_kyma_dashboard_image.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
#!/bin/bash
22

3-
set -e
4-
export KYMA_DASHBOARD_IMG="k3d-registry.localhost:5000/kyma-dashboard"
3+
# Runs Kyma dashboard docker image with desired ENV
54

6-
echo "Build local image"
7-
docker build -t "${KYMA_DASHBOARD_IMG}" -f Dockerfile .
8-
echo "Running kyma-dashboard... with ${ENV} configuration"
9-
docker run -d --rm --net=host --pid=host --name kyma-dashboard --env ENVIRONMENT="${ENV}" "${KYMA_DASHBOARD_IMG}"
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+
#
12+
echo "Running kyma-dashboard... with ${IMG} image"
13+
docker run -d --rm --net=host --pid=host --name kyma-dashboard --env ENVIRONMENT="${ENV}" "${IMG}"
1014

1115
echo "waiting for server to be up..."
1216
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' "http://localhost:3001")" != "200" ]]; do sleep 5; done

.github/scripts/setup_local_busola.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# This script returns the id of the draft release
3+
# Builds and runs busola using local nodejs
44

55
# standard bash error handling
66
set -o nounset # treat unset variables as an error and exit immediately.

.github/workflows/accessibility-tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
types: [opened, edited, synchronize, reopened, ready_for_review]
88
paths:
99
- '.github/workflows/accessibility-tests.yml'
10+
- '.github/scripts/**'
1011
- 'resources/**'
1112
- 'tests/integration/**'
1213
- 'nginx/**'
@@ -33,15 +34,15 @@ jobs:
3334
- name: Setup Kyma
3435
run: |
3536
set -o pipefail
36-
./.github/scripts/provision_kyma_k3d.sh | tee kyma-provision.log
37+
./.github/scripts/provision_k3d_for_kyma.sh | tee kyma-provision.log
3738
./.github/scripts/install-kyma.sh | tee kyma-alpha-deploy.log
3839
- uses: actions/setup-node@v4
3940
with:
4041
node-version: 22
4142
- name: Setup busola
4243
shell: bash
4344
run: |
44-
.github/scripts/setup_local_busola.sh
45+
.github/scripts/setup_local_busola.sh | tee busola.log
4546
- name: Run tests
4647
shell: bash
4748
env:

.github/workflows/create-release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,37 @@ jobs:
7979
run: ./.github/scripts/publish_release.sh
8080
outputs:
8181
release_id: ${{ steps.create-draft.outputs.release_id }}
82+
83+
promote-to-busola-deploy:
84+
name: Promote image versions to busola-deploy/dev
85+
needs: create-release
86+
runs-on: ubuntu-latest
87+
if: ${{ github.event.inputs.name != '' }}
88+
steps:
89+
# Checkout the target busola-deploy repository on the dev branch
90+
- name: Checkout busola-deploy repo
91+
uses: actions/checkout@v4
92+
with:
93+
repository: kyma/busola-deploy
94+
github-server-url: 'https://github.tools.sap'
95+
ref: dev
96+
token: ${{ secrets.BUSOLA_DEPLOY_PAT }} # Needs write access
97+
98+
# Update the version part of the image tags in dev/main.tf
99+
- name: Update image versions in main.tf
100+
run: |
101+
sed -i -E 's|(busola_backend_image\s*=\s*".*:)[^"]+|\1${{ github.event.inputs.name }}|' dev/main.tf
102+
sed -i -E 's|(busola_web_image\s*=\s*".*:)[^"]+|\1${{ github.event.inputs.name }}|' dev/main.tf
103+
104+
# Open a pull request to the dev branch with the updated image versions
105+
- name: Create Pull Request
106+
uses: peter-evans/create-pull-request@v7
107+
with:
108+
token: ${{ secrets.BUSOLA_DEPLOY_PAT }}
109+
commit-message: "chore: promote busola images to ${{ github.event.inputs.name }}"
110+
branch: promote-busola-images-${{ github.event.inputs.name }}
111+
title: "chore: promote busola images to ${{ github.event.inputs.name }}"
112+
labels: promote-to-dev-pending
113+
body: |
114+
This PR updates the Busola image versions in dev/main.tf to ${{ github.event.inputs.name }}.
115+
base: dev

.github/workflows/pr-all-checks-passed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
checks: read
1111
contents: read
1212
steps:
13-
- uses: wechuli/allcheckspassed@2e5e8bbc775f5680ed5d02e3a22e2fc7219792ac
13+
- uses: wechuli/allcheckspassed@v1.2.0
1414
with:
1515
retries: '40'
1616
polling_interval: '1'

0 commit comments

Comments
 (0)