From 8b9d07fed6896ffabdc16d6dc98798d99dd5e358 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:37:12 +0100 Subject: [PATCH] Simplify camunda account-portal local dev setup (#13482) --- package.json | 1 + scripts/deploy-camunda.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 scripts/deploy-camunda.sh diff --git a/package.json b/package.json index 2816247939..e520b7c2cf 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "dev:noserver": "yarn run kill-builder && lerna run --stream dev:stack:up --ignore @budibase/account-portal-server && lerna run --stream dev --ignore @budibase/backend-core --ignore @budibase/server --ignore @budibase/worker --ignore=@budibase/account-portal-ui --ignore @budibase/account-portal-server", "dev:server": "yarn run kill-server && lerna run --stream dev --scope @budibase/worker --scope @budibase/server", "dev:accountportal": "yarn kill-accountportal && lerna run dev --stream --scope @budibase/account-portal-ui --scope @budibase/account-portal-server", + "dev:camunda": "./scripts/deploy-camunda.sh", "dev:all": "yarn run kill-all && lerna run --stream dev", "dev:built": "yarn run kill-all && cd packages/server && yarn dev:stack:up && cd ../../ && lerna run --stream dev:built", "dev:docker": "yarn build --scope @budibase/server --scope @budibase/worker && docker-compose -f hosting/docker-compose.build.yaml -f hosting/docker-compose.dev.yaml --env-file hosting/.env up --build --scale proxy-service=0", diff --git a/scripts/deploy-camunda.sh b/scripts/deploy-camunda.sh new file mode 100755 index 0000000000..d01ed64b5a --- /dev/null +++ b/scripts/deploy-camunda.sh @@ -0,0 +1,31 @@ +#!/bin/bash +yarn global add zbctl +export ZEEBE_ADDRESS='localhost:26500' + +cd ../budibase-bpm + +is_camunda_ready() { + if (zbctl --insecure status 2>/dev/null) | grep -q 'Healthy'; then + return 1 + else + return 0 + fi +} + +docker-compose up -d +echo "waiting for Camunda to be ready..." + +while is_camunda_ready -eq 0; do sleep 1; done + +cd src/main/resources/models + +echo "deploy processes..." +zbctl deploy resource offboarding.bpmn --insecure +zbctl deploy resource onboarding.bpmn --insecure + +cd ../../../../../budibase/packages/account-portal/packages/server + +yarn worker:run & cd ../../../.. && yarn dev:accountportal + + +