|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +## The script is currently not usable. The below commands need to be corrected and finalised. |
| 4 | + |
| 5 | +# Create backstage namespace in local cluster |
| 6 | +kubectl create ns backstage |
| 7 | + |
| 8 | +# Package postgres helm chart and install the same in backstage namespace |
| 9 | +helm package deployment/kubernetes/postgres/helm/ |
| 10 | +helm -n backstage upgrade --install postgres postgres-0.1.0.tgz |
| 11 | + |
| 12 | +# Copy latest app-config.yaml to backstage101 folder and dockerfile to packages/backend folder |
| 13 | +# This step was already completed. |
| 14 | + |
| 15 | +# Install backend app dependencies using yarn |
| 16 | +cd $CODESPACE_VSCODE_FOLDER/backstage-app/backstage101 |
| 17 | +yarn install --frozen-lockfile |
| 18 | +yarn tsc from backstage101 folder |
| 19 | + |
| 20 | +# Build backstage backend app with the latest app-config.yaml file |
| 21 | +cd $CODESPACE_VSCODE_FOLDER/backstage-app/backstage101/packages/backend |
| 22 | +yarn build backend --config ../../app-config.yaml |
| 23 | + |
| 24 | +# Build docker image with the latest build backend artefacts |
| 25 | +cd $CODESPACE_VSCODE_FOLDER |
| 26 | +# docker image build . -f packages/backend/Dockerfile --tag backstage:0.1.0 from backstage101 folder |
| 27 | +docker image build backstage-app/backstage101/ -f deployment/kubernetes/backstage/docker/Dockerfile --tag localhost:5001/backstage:0.1.0 |
| 28 | + |
| 29 | +# Push the latest docker image to local image registry |
| 30 | +docker push localhost:5001/backstage:0.1.0 |
| 31 | + |
| 32 | +# Package backstage helm chart and install the same in backstage namespace |
| 33 | +helm package deployment/kubernetes/backstage/helm/ |
| 34 | +helm -n backstage upgrade --install backstage backstage-0.1.0.tgz |
| 35 | + |
0 commit comments