From 2bb5feeb883d341227a82297168ec3ea9fde7ba9 Mon Sep 17 00:00:00 2001 From: Gilbert Date: Wed, 22 May 2024 09:21:00 -0500 Subject: [PATCH] Laconic frontend deployment Squashed commit of the following: commit 86e6600749b0f2d886b4b53bd7501b2abd09c0f8 Author: Nabarun Date: Tue May 21 11:59:32 2024 +0530 Update staging deployment records with new config values commit 3f11ff3da1f530eda1bdd40dc10e11da92966246 Author: Nabarun Date: Tue May 21 11:02:43 2024 +0530 Update build script for new VITE env variables commit f614199bb8d51fc1e7335aeaccc10bbca29413e7 Author: Nabarun Date: Fri May 17 12:34:36 2024 +0530 Update subdomain commit 0787d2008b5bb15b4b0f8b542bc31780c8a820b3 Author: Nabarun Date: Fri May 17 12:03:29 2024 +0530 Update GitHub client ID and subdomain commit b9ffb691dc2292719eedfb27e7dce3aca43f8f72 Author: Nabarun Date: Fri May 17 11:28:22 2024 +0530 Add staging deployment records commit 25e47aa5ec9fd687abb37f6edfe78233ddec64cb Author: Nabarun Date: Fri May 17 10:56:26 2024 +0530 Add deployment script for staging --- build-webapp.sh | 16 ++- packages/deployer/README.md | 15 ++- packages/deployer/config.staging.yml | 9 ++ packages/deployer/deploy-frontend.sh | 12 +-- packages/deployer/deploy-frontend.staging.sh | 101 ++++++++++++++++++ .../application-deployment-request.yml | 24 +++++ .../staging-records/application-record.yml | 8 ++ 7 files changed, 171 insertions(+), 14 deletions(-) create mode 100644 packages/deployer/config.staging.yml create mode 100755 packages/deployer/deploy-frontend.staging.sh create mode 100644 packages/deployer/staging-records/application-deployment-request.yml create mode 100644 packages/deployer/staging-records/application-record.yml diff --git a/build-webapp.sh b/build-webapp.sh index d350c0dc..03210bf2 100755 --- a/build-webapp.sh +++ b/build-webapp.sh @@ -10,11 +10,17 @@ if [[ -d "$DEST_DIR" ]]; then fi cat > $PKG_DIR/.env </dev/null | jq -r -s ".[] | sort_by(.createTime) | reverse | [ .[] | select(.bondId == \"$REGISTRY_BOND_ID\") ] | .[0].attributes.version" | awk -F. -v OFS=. '{$NF += 1 ; print}') + +if [ -z "$NEW_APPLICATION_VERSION" ] || [ "1" == "$NEW_APPLICATION_VERSION" ]; then + # Set application-record version if no previous records were found + NEW_APPLICATION_VERSION=0.0.1 +fi + +# Generate application-deployment-request.yml +cat > ./staging-records/application-deployment-request.yml < ./staging-records/application-record.yml <