From 8388838703001332176e7d90b4a4f5ba866cbde3 Mon Sep 17 00:00:00 2001 From: Vijaykant Yadav Date: Thu, 3 Jul 2025 12:41:36 +0530 Subject: [PATCH 01/19] fix: disable pages on modules --- .../src/AppBuilder/AppCanvas/AppCanvas.jsx | 2 +- .../RightSideBar/RightSidebarToggle.jsx | 24 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx b/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx index 12d33283c8..1566e87287 100644 --- a/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx +++ b/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx @@ -182,7 +182,7 @@ export const AppCanvas = ({ appId, isViewer = false, switchDarkMode, darkMode }) )} style={canvasContainerStyles} > - {showOnDesktop && ( + {showOnDesktop && appType !== 'module' && ( { @@ -13,6 +14,7 @@ const RightSidebarToggle = ({ darkMode = false }) => { (state) => [state.isRightSidebarOpen, state.setRightSidebarOpen], shallow ); + const { appType } = useModuleContext(); const setActiveRightSideBarTab = useStore((state) => state.setActiveRightSideBarTab); const activeRightSideBarTab = useStore((state) => state.activeRightSideBarTab); const isRightSidebarPinned = useStore((state) => state.isRightSidebarPinned); @@ -50,16 +52,18 @@ const RightSidebarToggle = ({ darkMode = false }) => { className={`left-sidebar-item left-sidebar-layout left-sidebar-inspector`} tip="Component properties" /> - { - handleToggle(RIGHT_SIDE_BAR_TAB.PAGES); - }} - darkMode={darkMode} - icon="file01" - className={`left-sidebar-item left-sidebar-layout left-sidebar-inspector`} - tip="Page settings" - /> + {appType !== 'module' && ( + { + handleToggle(RIGHT_SIDE_BAR_TAB.PAGES); + }} + darkMode={darkMode} + icon="file01" + className={`left-sidebar-item left-sidebar-layout left-sidebar-inspector`} + tip="Page settings" + /> + )} ); }; From 108aa42eea4f27385b72d9ea91a33983713973bf Mon Sep 17 00:00:00 2001 From: Kavin Venkatachalam Date: Thu, 3 Jul 2025 16:38:40 +0530 Subject: [PATCH 02/19] fix: show modules inside the editor --- frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx b/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx index 1566e87287..1c7d2d6d69 100644 --- a/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx +++ b/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx @@ -202,6 +202,7 @@ export const AppCanvas = ({ appId, isViewer = false, switchDarkMode, darkMode }) scrollbarWidth: 'none', overflow: 'auto', width: currentMode === 'view' ? `calc(100% - ${isViewerSidebarPinned ? '0px' : '0px'})` : '100%', + height: 'inherit', }} className={`app-${appId} _tooljet-page-${getPageId()}`} > @@ -213,7 +214,7 @@ export const AppCanvas = ({ appId, isViewer = false, switchDarkMode, darkMode }) {environmentLoadingState !== 'loading' && (
Date: Wed, 2 Jul 2025 14:18:59 +0530 Subject: [PATCH 03/19] fix: add fallback for useModuleId hook in query panel Handle case where ModuleContext is not available by wrapping useModuleId in try-catch with 'canvas' fallback --- frontend/package.json | 2 +- .../src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 57785151d3..3034d57e39 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -267,4 +267,4 @@ "jsx" ] } -} +} \ No newline at end of file diff --git a/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js b/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js index 1a41a7f19b..b5f549a354 100644 --- a/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js +++ b/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js @@ -7,7 +7,14 @@ export const useQueryPanelKeyHooks = (onChange, value, type) => { const queryPanelHeight = useStore((state) => state.queryPanel.queryPanelHeight); const runQueryOnShortcut = useStore((state) => state.queryPanel.runQueryOnShortcut); const previewQueryOnShortcut = useStore((state) => state.queryPanel.previewQueryOnShortcut); - const moduleId = useModuleId(); + + // Handle case where ModuleContext is not available + let moduleId; + try { + moduleId = useModuleId(); + } catch (error) { + moduleId = 'canvas'; // Default fallback + } const location = useLocation(); const { pathname } = location; From d9b6efefadb24010586d6f50d23f8190e2ee6e43 Mon Sep 17 00:00:00 2001 From: Kavin Venkatachalam Date: Thu, 3 Jul 2025 16:39:19 +0530 Subject: [PATCH 04/19] Updated submodules ref --- frontend/ee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ee b/frontend/ee index 0ae5dac299..a2aaf14252 160000 --- a/frontend/ee +++ b/frontend/ee @@ -1 +1 @@ -Subproject commit 0ae5dac299e4a72e219243255722fbea2f530808 +Subproject commit a2aaf14252bfe033d52c37675bfc75aa03bf9389 From edf657b659f5a9b2433473493b2ae139e2ada188 Mon Sep 17 00:00:00 2001 From: Kavin Venkatachalam Date: Thu, 3 Jul 2025 17:47:41 +0530 Subject: [PATCH 05/19] Revert "fix: add fallback for useModuleId hook in query panel" This reverts commit 27ba7dec307a4c365971109cbe445a2cbba0ad69. --- frontend/package.json | 2 +- .../src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 3034d57e39..57785151d3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -267,4 +267,4 @@ "jsx" ] } -} \ No newline at end of file +} diff --git a/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js b/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js index b5f549a354..1a41a7f19b 100644 --- a/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js +++ b/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js @@ -7,14 +7,7 @@ export const useQueryPanelKeyHooks = (onChange, value, type) => { const queryPanelHeight = useStore((state) => state.queryPanel.queryPanelHeight); const runQueryOnShortcut = useStore((state) => state.queryPanel.runQueryOnShortcut); const previewQueryOnShortcut = useStore((state) => state.queryPanel.previewQueryOnShortcut); - - // Handle case where ModuleContext is not available - let moduleId; - try { - moduleId = useModuleId(); - } catch (error) { - moduleId = 'canvas'; // Default fallback - } + const moduleId = useModuleId(); const location = useLocation(); const { pathname } = location; From ace4fe754cb7ca562bd48ee2a439adeb389d7f72 Mon Sep 17 00:00:00 2001 From: Kavin Venkatachalam Date: Thu, 3 Jul 2025 17:49:20 +0530 Subject: [PATCH 06/19] fix: Added a fallback for module context --- frontend/src/AppBuilder/_contexts/ModuleContext.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/AppBuilder/_contexts/ModuleContext.jsx b/frontend/src/AppBuilder/_contexts/ModuleContext.jsx index d0f2b96c31..b216743ed2 100644 --- a/frontend/src/AppBuilder/_contexts/ModuleContext.jsx +++ b/frontend/src/AppBuilder/_contexts/ModuleContext.jsx @@ -13,7 +13,7 @@ export const ModuleProvider = ({ moduleId, isModuleMode, appType, isModuleEditor export const useModuleContext = () => { const context = useContext(ModuleContext); if (!context) { - throw new Error('useModuleContext must be used within a ModuleProvider'); + return { moduleId: 'canvas', isModuleMode: false, isModuleEditor: false }; } return context; }; @@ -21,7 +21,7 @@ export const useModuleContext = () => { export const useModuleId = () => { const context = useContext(ModuleContext); if (!context) { - throw new Error('useModuleId must be used within a ModuleProvider'); + return 'canvas'; } return context.moduleId; From 841d66078342bb08bf7eda4a31928af1db3b1bac Mon Sep 17 00:00:00 2001 From: Kavin Venkatachalam Date: Thu, 3 Jul 2025 19:15:20 +0530 Subject: [PATCH 07/19] fix: modules are hidden if the query manager is expanded --- frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx b/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx index 1c7d2d6d69..b48143f383 100644 --- a/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx +++ b/frontend/src/AppBuilder/AppCanvas/AppCanvas.jsx @@ -202,7 +202,7 @@ export const AppCanvas = ({ appId, isViewer = false, switchDarkMode, darkMode }) scrollbarWidth: 'none', overflow: 'auto', width: currentMode === 'view' ? `calc(100% - ${isViewerSidebarPinned ? '0px' : '0px'})` : '100%', - height: 'inherit', + ...(appType === 'module' && isModuleMode && { height: 'inherit' }), }} className={`app-${appId} _tooljet-page-${getPageId()}`} > From f60784aecc00f2075fa8884a82004e075d1219a1 Mon Sep 17 00:00:00 2001 From: johnsoncherian Date: Thu, 3 Jul 2025 20:36:37 +0530 Subject: [PATCH 08/19] chore: update version for release --- frontend/ee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ee b/frontend/ee index a2aaf14252..c5cd423567 160000 --- a/frontend/ee +++ b/frontend/ee @@ -1 +1 @@ -Subproject commit a2aaf14252bfe033d52c37675bfc75aa03bf9389 +Subproject commit c5cd423567d754d5a1edfa195faf9074c163da83 From b8aceb2e7a46131e14a973862a0a773e305d8f0a Mon Sep 17 00:00:00 2001 From: Adish M <44204658+adishM98@users.noreply.github.com> Date: Thu, 3 Jul 2025 20:49:15 +0530 Subject: [PATCH 09/19] fix: Update server installation steps in Dockerfile for consistency (#13183) --- docker/cloud/cloud-server.Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/cloud/cloud-server.Dockerfile b/docker/cloud/cloud-server.Dockerfile index 7c04f8e567..08b56258da 100644 --- a/docker/cloud/cloud-server.Dockerfile +++ b/docker/cloud/cloud-server.Dockerfile @@ -44,8 +44,10 @@ ENV NODE_ENV=production # Building ToolJet server COPY ./server/package.json ./server/package-lock.json ./server/ -RUN npm --prefix server install --only=production +RUN npm --prefix server install COPY ./server/ ./server/ +RUN npm install -g @nestjs/cli +RUN npm install -g copyfiles RUN npm --prefix server run build FROM debian:12 From 317f1e913f4d5257b3c46cf3eb5fb6baaf3472bf Mon Sep 17 00:00:00 2001 From: Adish M <44204658+adishM98@users.noreply.github.com> Date: Thu, 3 Jul 2025 20:58:10 +0530 Subject: [PATCH 10/19] fix: Update path for server keys in Dockerfile (#13184) --- docker/cloud/cloud-server.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/cloud/cloud-server.Dockerfile b/docker/cloud/cloud-server.Dockerfile index 08b56258da..2259c8cecb 100644 --- a/docker/cloud/cloud-server.Dockerfile +++ b/docker/cloud/cloud-server.Dockerfile @@ -99,7 +99,7 @@ COPY --from=builder /app/plugins/package.json ./app/plugins/package.json # copy server build COPY --from=builder /app/server/package.json ./app/server/package.json COPY --from=builder /app/server/.version ./app/server/.version -COPY --from=builder /app/server/keys ./app/server/keys +COPY --from=builder /app/server/ee/keys ./app/server/ee/keys COPY --from=builder /app/server/node_modules ./app/server/node_modules COPY --from=builder /app/server/templates ./app/server/templates COPY --from=builder /app/server/scripts ./app/server/scripts From 1c2b312b9e52d16b22511a72a474eab395c78ae9 Mon Sep 17 00:00:00 2001 From: johnsoncherian Date: Thu, 3 Jul 2025 21:02:31 +0530 Subject: [PATCH 11/19] chore: update version for release --- frontend/ee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ee b/frontend/ee index c5cd423567..576b20238c 160000 --- a/frontend/ee +++ b/frontend/ee @@ -1 +1 @@ -Subproject commit c5cd423567d754d5a1edfa195faf9074c163da83 +Subproject commit 576b20238ceaa6920a8b7da6c49d4d6baee29ac6 From e051caca47b0ed5a52aad3ec346acdfb2262a31b Mon Sep 17 00:00:00 2001 From: Adish M <44204658+adishM98@users.noreply.github.com> Date: Thu, 3 Jul 2025 21:47:25 +0530 Subject: [PATCH 12/19] fix: Update environment variable secrets for cloud deployment (#13171) * fix: Update environment variable secrets for cloud deployment * Add submodule checkout step to cloud frontend deployment workflow * fix: Update checkout step to use actions/checkout@v4 and streamline configuration * fix: Add missing environment variables for cloud deployment * Update Node.js and NPM versions in Netlify configuration --- .github/workflows/cloud-frontend.yml | 37 +++++++++++++++++++--------- netlify.toml | 7 +++--- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cloud-frontend.yml b/.github/workflows/cloud-frontend.yml index ee8c59ab4a..e8d4171248 100644 --- a/.github/workflows/cloud-frontend.yml +++ b/.github/workflows/cloud-frontend.yml @@ -36,10 +36,12 @@ jobs: # exit 1 # fi - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout code (with submodules) + uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch }} + token: ${{ secrets.TOKEN_PR }} + submodules: recursive - name: Setup Node.js uses: actions/setup-node@v2 @@ -52,16 +54,16 @@ jobs: - name: Build the project run: npm run build:plugins:prod && npm run build:frontend env: - GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }} - NODE_ENV: ${{ secrets.NODE_ENV }} - NODE_OPTIONS: ${{ secrets.NODE_OPTIONS }} - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} - SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} - SERVE_CLIENT: ${{ secrets.SERVE_CLIENT }} - SERVER_IP: ${{ secrets.SERVER_IP }} - TJDB_SQL_MODE_DISABLE: ${{ secrets.TJDB_SQL_MODE_DISABLE }} - TOOLJET_SERVER_URL: ${{ secrets.TOOLJET_SERVER_URL }} + GOOGLE_MAPS_API_KEY: ${{ secrets.CLOUD_GOOGLE_MAPS_API_KEY }} + NODE_ENV: ${{ secrets.CLOUD_NODE_ENV }} + NODE_OPTIONS: ${{ secrets.CLOUD_NODE_OPTIONS }} + SENTRY_AUTH_TOKEN: ${{ secrets.CLOUD_SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ secrets.CLOUD_SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.CLOUD_SENTRY_PROJECT }} + SERVE_CLIENT: ${{ secrets.CLOUD_SERVE_CLIENT }} + SERVER_IP: ${{ secrets.CLOUD_SERVER_IP }} + TJDB_SQL_MODE_DISABLE: ${{ secrets.CLOUD_TJDB_SQL_MODE_DISABLE }} + TOOLJET_SERVER_URL: ${{ secrets.CLOUD_TOOLJET_SERVER_URL }} TOOLJET_EDITION: cloud - name: Deploy to Netlify @@ -70,6 +72,17 @@ jobs: netlify deploy --prod --dir=frontend/build --auth=$NETLIFY_AUTH_TOKEN --site=${{ secrets.CLOUD_NETLIFY_SITE_ID }} env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + GOOGLE_MAPS_API_KEY: ${{ secrets.CLOUD_GOOGLE_MAPS_API_KEY }} + NODE_ENV: ${{ secrets.CLOUD_NODE_ENV }} + NODE_OPTIONS: ${{ secrets.CLOUD_NODE_OPTIONS }} + SENTRY_AUTH_TOKEN: ${{ secrets.CLOUD_SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ secrets.CLOUD_SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.CLOUD_SENTRY_PROJECT }} + SERVE_CLIENT: ${{ secrets.CLOUD_SERVE_CLIENT }} + SERVER_IP: ${{ secrets.CLOUD_SERVER_IP }} + TJDB_SQL_MODE_DISABLE: ${{ secrets.CLOUD_TJDB_SQL_MODE_DISABLE }} + TOOLJET_SERVER_URL: ${{ secrets.CLOUD_TOOLJET_SERVER_URL }} + TOOLJET_EDITION: cloud - name: ✅ Deployment complete run: echo "🎉 Deployment to Netlify successful for branch ${{ github.event.inputs.branch }} by ${{ github.actor }}" diff --git a/netlify.toml b/netlify.toml index b6e4bc7077..cea3f8a356 100644 --- a/netlify.toml +++ b/netlify.toml @@ -4,9 +4,10 @@ command = "npm run build:plugins:prod && npm run build:frontend" [template.environment] - NODE_ENV = "production" - NODE_VERSION = "14.17.3" - NPM_VERSION = "7.20.0" + NODE_ENV = "production" + TOOOLJET_EDITION = "cloud" + NODE_VERSION = "22.15.1" + NPM_VERSION = "10.9.2" [[redirects]] from = "/*" From 0e8ed516b8e48716ba37ca6f20adade07fea95c3 Mon Sep 17 00:00:00 2001 From: Adish M <44204658+adishM98@users.noreply.github.com> Date: Thu, 3 Jul 2025 22:31:21 +0530 Subject: [PATCH 13/19] fix: Correct typo in TOOLJET_EDITION and update redirects in netlify.toml (#13186) --- netlify.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/netlify.toml b/netlify.toml index cea3f8a356..2a4817c6d2 100644 --- a/netlify.toml +++ b/netlify.toml @@ -5,11 +5,12 @@ [template.environment] NODE_ENV = "production" - TOOOLJET_EDITION = "cloud" + TOOLJET_EDITION = "cloud" NODE_VERSION = "22.15.1" NPM_VERSION = "10.9.2" [[redirects]] - from = "/*" - to = "/" - status = 200 \ No newline at end of file + from = "/api/*" + to = "https://gcpstage-server.tooljet.ai/api/:splat" + status = 200 + force = true \ No newline at end of file From 86151ee64d1e8af61f03eeaab2b489372d1e9ae4 Mon Sep 17 00:00:00 2001 From: adishM98 Bot Date: Thu, 3 Jul 2025 17:02:08 +0000 Subject: [PATCH 14/19] =?UTF-8?q?=F0=9F=94=84=20chore:=20update=20submodul?= =?UTF-8?q?es=20to=20latest=20main=20after=20auto-merge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/ee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ee b/frontend/ee index 0ae5dac299..576b20238c 160000 --- a/frontend/ee +++ b/frontend/ee @@ -1 +1 @@ -Subproject commit 0ae5dac299e4a72e219243255722fbea2f530808 +Subproject commit 576b20238ceaa6920a8b7da6c49d4d6baee29ac6 From 441306a1de900caf6f6ef3934d5c715e3292c47b Mon Sep 17 00:00:00 2001 From: Adish M <44204658+adishM98@users.noreply.github.com> Date: Thu, 3 Jul 2025 22:37:08 +0530 Subject: [PATCH 15/19] Update netlify.toml (#13187) --- netlify.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 2a4817c6d2..46d828d6b5 100644 --- a/netlify.toml +++ b/netlify.toml @@ -13,4 +13,9 @@ from = "/api/*" to = "https://gcpstage-server.tooljet.ai/api/:splat" status = 200 - force = true \ No newline at end of file + force = true + +[[redirects]] + from = "/*" + to = "/" + status = 200 From 6355d6d509e447151ecfe70e259d5bb0bf267c3d Mon Sep 17 00:00:00 2001 From: Adish M <44204658+adishM98@users.noreply.github.com> Date: Thu, 3 Jul 2025 23:02:06 +0530 Subject: [PATCH 16/19] fix: Remove outdated API redirects from netlify.toml (#13188) --- netlify.toml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/netlify.toml b/netlify.toml index 46d828d6b5..07787f351c 100644 --- a/netlify.toml +++ b/netlify.toml @@ -9,12 +9,6 @@ NODE_VERSION = "22.15.1" NPM_VERSION = "10.9.2" -[[redirects]] - from = "/api/*" - to = "https://gcpstage-server.tooljet.ai/api/:splat" - status = 200 - force = true - [[redirects]] from = "/*" to = "/" From eae10cddebf1dbc9a01d7aaf9a5003e95cb074e8 Mon Sep 17 00:00:00 2001 From: Adish M <44204658+adishM98@users.noreply.github.com> Date: Fri, 4 Jul 2025 12:00:20 +0530 Subject: [PATCH 17/19] Update Docker image build references and add cloud edition workflow (#13191) --- .github/workflows/docker-release.yml | 107 +++++++++++++-------------- 1 file changed, 53 insertions(+), 54 deletions(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index ca3a7420b7..7afca64ea7 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -21,7 +21,7 @@ jobs: if: "contains(github.event.release.tag_name, '-ce-lts')" uses: actions/checkout@v2 with: - ref: refs/heads/lts-4.0 + ref: refs/heads/lts-3.6 # Create Docker Buildx builder with platform configuration - name: Set up Docker Buildx @@ -99,7 +99,7 @@ jobs: steps: - name: Checkout code to main for pre-release EE edition - if: "!contains(github.event.release.tag_name, 'ee-lts')" + if: "!contains(github.event.release.tag_name, '-lts')" uses: actions/checkout@v2 with: ref: refs/heads/main @@ -108,7 +108,7 @@ jobs: if: "contains(github.event.release.tag_name, '-ee-lts')" uses: actions/checkout@v2 with: - ref: refs/heads/lts-4.0 + ref: refs/heads/lts-3.6 # Create Docker Buildx builder with platform configuration - name: Set up Docker Buildx @@ -148,7 +148,6 @@ jobs: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and Push Docker image for LTS tag if: "contains(github.event.release.tag_name, '-ee-lts')" uses: docker/build-push-action@v4 @@ -156,7 +155,7 @@ jobs: context: . build-args: | CUSTOM_GITHUB_TOKEN=${{ secrets.CUSTOM_GITHUB_TOKEN }} - BRANCH_NAME=lts + BRANCH_NAME=lts-3.6 file: docker/ee/ee-production.Dockerfile push: true tags: tooljet/tooljet-ee:${{ github.event.release.tag_name }},tooljet/tooljet-ee:ee-lts-latest,tooljet/tooljet:ee-lts-latest,tooljet/tooljet:${{ github.event.release.tag_name }} @@ -176,64 +175,64 @@ jobs: curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }} -# commented out for now, since cloud modularisation is not yet ready + build-tooljet-image-for-cloud-edtion: - # build-tooljet-image-for-cloud-edtion: + runs-on: ubuntu-latest + if: "${{ github.event.release }}" - # runs-on: ubuntu-latest - # if: "${{ github.event.release }}" + steps: + - name: Checkout code to LTS for Cloud LTS edition + if: "contains(github.event.release.tag_name, '-cloud-lts')" + uses: actions/checkout@v2 + with: + ref: refs/heads/lts-3.6 - # steps: - # - name: Checkout code to LTS for Cloud LTS edition - # if: "contains(github.event.release.tag_name, '-cloud-lts')" - # uses: actions/checkout@v2 - # with: - # ref: refs/heads/lts-4.0 + # Create Docker Buildx builder with platform configuration + - name: Set up Docker Buildx + run: | + mkdir -p ~/.docker/cli-plugins + curl -SL https://github.com/docker/buildx/releases/download/v0.11.0/buildx-v0.11.0.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx + chmod a+x ~/.docker/cli-plugins/docker-buildx + docker buildx create --name mybuilder --platform linux/arm64,linux/amd64,linux/amd64/v2,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 + docker buildx use mybuilder - # # Create Docker Buildx builder with platform configuration - # - name: Set up Docker Buildx - # run: | - # mkdir -p ~/.docker/cli-plugins - # curl -SL https://github.com/docker/buildx/releases/download/v0.11.0/buildx-v0.11.0.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx - # chmod a+x ~/.docker/cli-plugins/docker-buildx - # docker buildx create --name mybuilder --platform linux/arm64,linux/amd64,linux/amd64/v2,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 - # docker buildx use mybuilder + - name: Set DOCKER_CLI_EXPERIMENTAL + run: echo "DOCKER_CLI_EXPERIMENTAL=enabled" >> $GITHUB_ENV - # - name: Set DOCKER_CLI_EXPERIMENTAL - # run: echo "DOCKER_CLI_EXPERIMENTAL=enabled" >> $GITHUB_ENV + - name: use mybuilder buildx + run: docker buildx use mybuilder - # - name: use mybuilder buildx - # run: docker buildx use mybuilder + - name: Docker Login + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - # - name: Docker Login - # uses: docker/login-action@v2 - # with: - # username: ${{ secrets.DOCKER_USERNAME }} - # password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and Push Docker image for LTS tag + if: "contains(github.event.release.tag_name, '-cloud-lts')" + uses: docker/build-push-action@v4 + with: + context: . + build-args: | + CUSTOM_GITHUB_TOKEN=${{ secrets.CUSTOM_GITHUB_TOKEN }} + BRANCH_NAME=lts-3.6 + file: docker/cloud/cloud-server.Dockerfile + push: true + tags: tooljet/saas:${{ github.event.release.tag_name }} + platforms: linux/amd64 + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - # - name: Build and Push Docker image for LTS tag - # if: "contains(github.event.release.tag_name, '-cloud-lts')" - # uses: docker/build-push-action@v4 - # with: - # context: . - # args: ${{ secrets.CUSTOM_GITHUB_TOKEN }} - # file: docker/cloud/cloud-server.Dockerfile - # push: true - # tags: tooljet/saas:${{ github.event.release.tag_name }} - # platforms: linux/amd64 - # env: - # DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - # DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - name: Send Slack Notification + run: | + if [[ "${{ job.status }}" == "success" ]]; then + message="ToolJet cloud image published:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`" + else + message="Job '${{ env.JOB_NAME }}' failed! Image built:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`" + fi - # - name: Send Slack Notification - # run: | - # if [[ "${{ job.status }}" == "success" ]]; then - # message="ToolJet cloud image published:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`" - # else - # message="Job '${{ env.JOB_NAME }}' failed! Image built:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`" - # fi - - # curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }} + curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }} try-tooljet-image-build: From c99e7dd856d466323cbf2935e20ce4df9d1374e9 Mon Sep 17 00:00:00 2001 From: Adish M <44204658+adishM98@users.noreply.github.com> Date: Fri, 4 Jul 2025 17:46:30 +0530 Subject: [PATCH 18/19] fix: Restore authorization check in cloud frontend deployment workflow (#13195) * fix: Restore authorization check in cloud frontend deployment workflow * fix: Reinstate branch prefix validation in cloud frontend deployment workflow * fix: Enhance Netlify deployment step for cleaner output * fix: Update cloud frontend deployment workflow for improved clarity and authorization checks * Remove deployment completion message from cloud frontend workflow * Remove branch prefix validation from cloud frontend deployment workflow --- .github/workflows/cloud-frontend.yml | 54 ++++++++-------------------- 1 file changed, 14 insertions(+), 40 deletions(-) diff --git a/.github/workflows/cloud-frontend.yml b/.github/workflows/cloud-frontend.yml index e8d4171248..20025bf82c 100644 --- a/.github/workflows/cloud-frontend.yml +++ b/.github/workflows/cloud-frontend.yml @@ -4,9 +4,8 @@ on: workflow_dispatch: inputs: branch: - description: 'Branch to deploy (must start with lts/)' + description: 'Git branch to deploy (must start with "lts-", e.g., lts-3.6)' required: true - default: 'lts/latest' jobs: build: @@ -14,27 +13,20 @@ jobs: steps: - # - name: Check authorization - # run: | - # allowed_user1=${{ secrets.ALLOWED_USER1_USERNAME }} - # allowed_user2=${{ secrets.ALLOWED_USER2_USERNAME }} - # allowed_user3=${{ secrets.ALLOWED_USER3_USERNAME }} + - name: Check user authorization + run: | + allowed_user1=${{ secrets.ALLOWED_USER1_USERNAME }} + allowed_user2=${{ secrets.ALLOWED_USER2_USERNAME }} + allowed_user3=${{ secrets.ALLOWED_USER3_USERNAME }} - # if [[ "${{ github.actor }}" != "$allowed_user1" && \ - # "${{ github.actor }}" != "$allowed_user2" && \ - # "${{ github.actor }}" != "$allowed_user3" ]]; then - # echo "❌ User '${{ github.actor }}' is not authorized to trigger this workflow." - # exit 1 - # else - # echo "✅ User '${{ github.actor }}' is authorized." - # fi - - # - name: Validate branch prefix - # run: | - # if [[ "${{ github.event.inputs.branch }}" != lts/* ]]; then - # echo "❌ Branch name must start with 'lts/'" - # exit 1 - # fi + if [[ "${{ github.actor }}" != "$allowed_user1" && \ + "${{ github.actor }}" != "$allowed_user2" && \ + "${{ github.actor }}" != "$allowed_user3" ]]; then + echo "❌ User '${{ github.actor }}' is not authorized to trigger this workflow." + exit 1 + else + echo "✅ User '${{ github.actor }}' is authorized." + fi - name: Checkout code (with submodules) uses: actions/checkout@v4 @@ -51,21 +43,6 @@ jobs: - name: Install dependencies run: npm install - - name: Build the project - run: npm run build:plugins:prod && npm run build:frontend - env: - GOOGLE_MAPS_API_KEY: ${{ secrets.CLOUD_GOOGLE_MAPS_API_KEY }} - NODE_ENV: ${{ secrets.CLOUD_NODE_ENV }} - NODE_OPTIONS: ${{ secrets.CLOUD_NODE_OPTIONS }} - SENTRY_AUTH_TOKEN: ${{ secrets.CLOUD_SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ secrets.CLOUD_SENTRY_ORG }} - SENTRY_PROJECT: ${{ secrets.CLOUD_SENTRY_PROJECT }} - SERVE_CLIENT: ${{ secrets.CLOUD_SERVE_CLIENT }} - SERVER_IP: ${{ secrets.CLOUD_SERVER_IP }} - TJDB_SQL_MODE_DISABLE: ${{ secrets.CLOUD_TJDB_SQL_MODE_DISABLE }} - TOOLJET_SERVER_URL: ${{ secrets.CLOUD_TOOLJET_SERVER_URL }} - TOOLJET_EDITION: cloud - - name: Deploy to Netlify run: | npm install -g netlify-cli @@ -83,6 +60,3 @@ jobs: TJDB_SQL_MODE_DISABLE: ${{ secrets.CLOUD_TJDB_SQL_MODE_DISABLE }} TOOLJET_SERVER_URL: ${{ secrets.CLOUD_TOOLJET_SERVER_URL }} TOOLJET_EDITION: cloud - - - name: ✅ Deployment complete - run: echo "🎉 Deployment to Netlify successful for branch ${{ github.event.inputs.branch }} by ${{ github.actor }}" From 584aa7a7eea0e0a8b2f6c95d46dd360ce05ac8c5 Mon Sep 17 00:00:00 2001 From: adishM98 Bot Date: Fri, 4 Jul 2025 12:17:17 +0000 Subject: [PATCH 19/19] =?UTF-8?q?=F0=9F=94=84=20chore:=20update=20submodul?= =?UTF-8?q?es=20to=20latest=20main=20after=20auto-merge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/ee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ee b/frontend/ee index 576b20238c..82d28db0cd 160000 --- a/frontend/ee +++ b/frontend/ee @@ -1 +1 @@ -Subproject commit 576b20238ceaa6920a8b7da6c49d4d6baee29ac6 +Subproject commit 82d28db0cd954aa017d97938f368586b0650ef09