From c6e657a7b45cbf5e8897309b005bdf7d0a2f214d Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 20:32:27 +0000 Subject: [PATCH 01/57] Bump version to 2.9.8 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 86af55741a..c33d100e72 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.7", + "version": "2.9.8", "npmClient": "yarn", "packages": [ "packages/*" From b925a347d2ffdcd7144c7dfcad62fcd9f3deeb1a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 11:35:04 +0300 Subject: [PATCH 02/57] Remove fetch-depth --- .github/workflows/budibase_ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 08fc2fe0b8..683f8cbfe8 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -173,7 +173,6 @@ jobs: uses: actions/checkout@v3 with: submodules: true - fetch-depth: 0 token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Check pro commit From a882e3341f4927f467b36e436fb017261cf11147 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 11:43:31 +0300 Subject: [PATCH 03/57] Add since flag --- .github/workflows/budibase_ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 683f8cbfe8..135fa035f5 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -18,6 +18,7 @@ env: BRANCH: ${{ github.event.pull_request.head.ref }} BASE_BRANCH: ${{ github.event.pull_request.base.ref}} PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + NX_BASE_BRANCH: ${{ github.base_ref || "origin/master"}} jobs: lint: @@ -61,9 +62,9 @@ jobs: cache: "yarn" - run: yarn --frozen-lockfile # Run build all the projects - - run: yarn build + - run: yarn build --since=${{ NX_BASE_BRANCH }} # Check the types of the projects built via esbuild - - run: yarn check:types + - run: yarn check:types --since=${{ NX_BASE_BRANCH }} test-libraries: runs-on: ubuntu-latest @@ -84,7 +85,7 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile - - run: yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro + - run: yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro --since=${{ NX_BASE_BRANCH }} - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos @@ -111,7 +112,7 @@ jobs: cache: "yarn" - run: yarn --frozen-lockfile - name: Test worker and server - run: yarn test --scope=@budibase/worker --scope=@budibase/server + run: yarn test --scope=@budibase/worker --scope=@budibase/server --since=${{ NX_BASE_BRANCH }} - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN || github.token }} # not required for public repos @@ -134,7 +135,7 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile - - run: yarn test --scope=@budibase/pro + - run: yarn test --scope=@budibase/pro --since=${{ NX_BASE_BRANCH }} integration-test: runs-on: ubuntu-latest From 19b3def9b855355b7c31df1a8808eabf19b49d05 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 11:45:59 +0300 Subject: [PATCH 04/57] Fix env --- .github/workflows/budibase_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 135fa035f5..b12b371f24 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -18,7 +18,7 @@ env: BRANCH: ${{ github.event.pull_request.head.ref }} BASE_BRANCH: ${{ github.event.pull_request.base.ref}} PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - NX_BASE_BRANCH: ${{ github.base_ref || "origin/master"}} + NX_BASE_BRANCH: ${{ github.base_ref || origin/master}} jobs: lint: From 3e7da2bfd10b9cdb495a1d632196f756209d7d44 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 11:47:10 +0300 Subject: [PATCH 05/57] Fix --- .github/workflows/budibase_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index b12b371f24..3218f69ff6 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -18,7 +18,7 @@ env: BRANCH: ${{ github.event.pull_request.head.ref }} BASE_BRANCH: ${{ github.event.pull_request.base.ref}} PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - NX_BASE_BRANCH: ${{ github.base_ref || origin/master}} + NX_BASE_BRANCH: ${{ github.base_ref || 'origin/master'}} jobs: lint: From 49bc467eb982686af6cd014e8d31dd9908148da6 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 11:48:16 +0300 Subject: [PATCH 06/57] Prefix env --- .github/workflows/budibase_ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 3218f69ff6..ea00c9438a 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -62,9 +62,9 @@ jobs: cache: "yarn" - run: yarn --frozen-lockfile # Run build all the projects - - run: yarn build --since=${{ NX_BASE_BRANCH }} + - run: yarn build --since=${{ env.NX_BASE_BRANCH }} # Check the types of the projects built via esbuild - - run: yarn check:types --since=${{ NX_BASE_BRANCH }} + - run: yarn check:types --since=${{ env.NX_BASE_BRANCH }} test-libraries: runs-on: ubuntu-latest @@ -85,7 +85,7 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile - - run: yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro --since=${{ NX_BASE_BRANCH }} + - run: yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos @@ -112,7 +112,7 @@ jobs: cache: "yarn" - run: yarn --frozen-lockfile - name: Test worker and server - run: yarn test --scope=@budibase/worker --scope=@budibase/server --since=${{ NX_BASE_BRANCH }} + run: yarn test --scope=@budibase/worker --scope=@budibase/server --since=${{ env.NX_BASE_BRANCH }} - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN || github.token }} # not required for public repos @@ -135,7 +135,7 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile - - run: yarn test --scope=@budibase/pro --since=${{ NX_BASE_BRANCH }} + - run: yarn test --scope=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} integration-test: runs-on: ubuntu-latest From d5d5c21ef80afcb09fd9eee992d1adf5bb1cef88 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 11:56:44 +0300 Subject: [PATCH 07/57] Change build to run in lerna --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4294e83883..4e4befb5f2 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "preinstall": "node scripts/syncProPackage.js", "setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn build && yarn dev", "bootstrap": "./scripts/link-dependencies.sh && echo '***BOOTSTRAP ONLY REQUIRED FOR USE WITH ACCOUNT PORTAL***'", - "build": "yarn nx run-many -t=build", + "build": "lerna run build --stream", "build:dev": "lerna run --stream prebuild && yarn nx run-many --target=build --output-style=dynamic --watch --preserveWatchOutput", "check:types": "lerna run check:types", "backend:bootstrap": "./scripts/scopeBackend.sh && yarn run bootstrap", From 987ee1b8b27b612f66ba165291311e002df503b9 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 11:58:29 +0300 Subject: [PATCH 08/57] Prefix NX_BASE_BRANCH --- .github/workflows/budibase_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index ea00c9438a..693d81372d 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -18,7 +18,7 @@ env: BRANCH: ${{ github.event.pull_request.head.ref }} BASE_BRANCH: ${{ github.event.pull_request.base.ref}} PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - NX_BASE_BRANCH: ${{ github.base_ref || 'origin/master'}} + NX_BASE_BRANCH: origin/${{ github.base_ref || 'master'}} jobs: lint: From 5eb49fbb293a737afd528e640701b425fd80ff2a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 12:08:39 +0300 Subject: [PATCH 09/57] Fetch remote refs --- .github/workflows/budibase_ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 693d81372d..52bff87e0c 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -61,6 +61,8 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile + - name: Fetch remote references + run: git fetch origin "+refs/heads/*:refs/remotes/origin/*" # Run build all the projects - run: yarn build --since=${{ env.NX_BASE_BRANCH }} # Check the types of the projects built via esbuild @@ -85,6 +87,8 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile + - name: Fetch remote references + run: git fetch origin "+refs/heads/*:refs/remotes/origin/*" - run: yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} - uses: codecov/codecov-action@v3 with: @@ -111,6 +115,8 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile + - name: Fetch remote references + run: git fetch origin "+refs/heads/*:refs/remotes/origin/*" - name: Test worker and server run: yarn test --scope=@budibase/worker --scope=@budibase/server --since=${{ env.NX_BASE_BRANCH }} - uses: codecov/codecov-action@v3 From 62bb5bb4ff85ee59296b3e88492920d3e42346e1 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 12:14:22 +0300 Subject: [PATCH 10/57] Fetch only required branch --- .github/workflows/budibase_ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 52bff87e0c..49d06fc430 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -18,7 +18,7 @@ env: BRANCH: ${{ github.event.pull_request.head.ref }} BASE_BRANCH: ${{ github.event.pull_request.base.ref}} PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - NX_BASE_BRANCH: origin/${{ github.base_ref || 'master'}} + NX_BASE_BRANCH: ${{ github.base_ref || 'master'}} jobs: lint: @@ -62,7 +62,7 @@ jobs: cache: "yarn" - run: yarn --frozen-lockfile - name: Fetch remote references - run: git fetch origin "+refs/heads/*:refs/remotes/origin/*" + run: git fetch origin ${{ env.NX_BASE_BRANCH }} # Run build all the projects - run: yarn build --since=${{ env.NX_BASE_BRANCH }} # Check the types of the projects built via esbuild @@ -88,7 +88,7 @@ jobs: cache: "yarn" - run: yarn --frozen-lockfile - name: Fetch remote references - run: git fetch origin "+refs/heads/*:refs/remotes/origin/*" + run: git fetch origin ${{ env.NX_BASE_BRANCH }} - run: yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} - uses: codecov/codecov-action@v3 with: @@ -116,7 +116,7 @@ jobs: cache: "yarn" - run: yarn --frozen-lockfile - name: Fetch remote references - run: git fetch origin "+refs/heads/*:refs/remotes/origin/*" + run: git fetch origin ${{ env.NX_BASE_BRANCH }} - name: Test worker and server run: yarn test --scope=@budibase/worker --scope=@budibase/server --since=${{ env.NX_BASE_BRANCH }} - uses: codecov/codecov-action@v3 From 903b1eac09f7bdbdcaa788dcf767933469094306 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 12:27:14 +0300 Subject: [PATCH 11/57] Fetch-depth --- .github/workflows/budibase_ci.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 49d06fc430..b2e256b044 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -51,9 +51,12 @@ jobs: with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} + fetch-depth: 0 - name: Checkout repo only uses: actions/checkout@v3 if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase' + with: + fetch-depth: 0 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -61,8 +64,7 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile - - name: Fetch remote references - run: git fetch origin ${{ env.NX_BASE_BRANCH }} + # Run build all the projects - run: yarn build --since=${{ env.NX_BASE_BRANCH }} # Check the types of the projects built via esbuild @@ -77,9 +79,12 @@ jobs: with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} + fetch-depth: 0 - name: Checkout repo only uses: actions/checkout@v3 if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase' + with: + fetch-depth: 0 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -87,8 +92,6 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile - - name: Fetch remote references - run: git fetch origin ${{ env.NX_BASE_BRANCH }} - run: yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} - uses: codecov/codecov-action@v3 with: @@ -105,9 +108,12 @@ jobs: with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} + fetch-depth: 0 - name: Checkout repo only uses: actions/checkout@v3 if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase' + with: + fetch-depth: 0 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -115,8 +121,6 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile - - name: Fetch remote references - run: git fetch origin ${{ env.NX_BASE_BRANCH }} - name: Test worker and server run: yarn test --scope=@budibase/worker --scope=@budibase/server --since=${{ env.NX_BASE_BRANCH }} - uses: codecov/codecov-action@v3 From fc6472c0cccd6ad783232d32ed196ab289bee12a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 12:31:46 +0300 Subject: [PATCH 12/57] Prefix --- .github/workflows/budibase_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index b2e256b044..2953aa0575 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -18,7 +18,7 @@ env: BRANCH: ${{ github.event.pull_request.head.ref }} BASE_BRANCH: ${{ github.event.pull_request.base.ref}} PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - NX_BASE_BRANCH: ${{ github.base_ref || 'master'}} + NX_BASE_BRANCH: origin/${{ github.base_ref || 'master'}} jobs: lint: From ee2f3e3157e81b9906225601d1fb48ca45d04be5 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 12:39:40 +0300 Subject: [PATCH 13/57] Fix build --- .github/workflows/budibase_ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 2953aa0575..cc1244e01a 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -138,6 +138,7 @@ jobs: with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} + fetch-depth: 0 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -166,7 +167,7 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile - - run: yarn build --projects=@budibase/server,@budibase/worker,@budibase/client + - run: yarn build --scope @budibase/server --scope @budibase/worker --scope @budibase/client - name: Run tests run: | cd qa-core From b22aeb03c40c7f410e47fdba6287572c7b32aef2 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 8 Aug 2023 11:39:36 +0100 Subject: [PATCH 14/57] Using the self hosted runners in the dev environment to build our single image ARM, AMD and AAS images. --- .github/workflows/release-selfhost.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-selfhost.yml b/.github/workflows/release-selfhost.yml index 39ee812726..1455f0838f 100644 --- a/.github/workflows/release-selfhost.yml +++ b/.github/workflows/release-selfhost.yml @@ -5,7 +5,7 @@ on: jobs: release: - runs-on: ubuntu-latest + runs-on: [self-hosted, dev] steps: - name: Fail if not a tag From aab04339b82078d3fb46b3e857cac8c246a72fb9 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 8 Aug 2023 11:01:28 +0000 Subject: [PATCH 15/57] Bump version to 2.9.9 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index c33d100e72..fd7dc65c76 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.8", + "version": "2.9.9", "npmClient": "yarn", "packages": [ "packages/*" From a220b201fc344275587a589ac31944da7483c81f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 8 Aug 2023 13:45:10 +0100 Subject: [PATCH 16/57] Updating self host single image build --- .github/workflows/release-singleimage.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-singleimage.yml b/.github/workflows/release-singleimage.yml index 1f4a2d0b32..f62e4d2a55 100644 --- a/.github/workflows/release-singleimage.yml +++ b/.github/workflows/release-singleimage.yml @@ -9,8 +9,8 @@ env: REGISTRY_URL: registry.hub.docker.com jobs: build-amd64-arm64: - name: "build-amd64" - runs-on: ubuntu-latest + name: "build-amd64-arm64" + runs-on: [self-hosted, dev] strategy: matrix: node-version: [14.x] @@ -74,7 +74,7 @@ jobs: build-aas: name: "build-aas" - runs-on: ubuntu-latest + runs-on: [self-hosted, dev] strategy: matrix: node-version: [14.x] From 73124fab6ae29d8c95a68163f3a6a76ef7b65a76 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 8 Aug 2023 12:45:37 +0000 Subject: [PATCH 17/57] Bump version to 2.9.10 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index fd7dc65c76..7506a3606e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.9", + "version": "2.9.10", "npmClient": "yarn", "packages": [ "packages/*" From 555e066be04b162b7f9c9a1fe72fb60b7520e89e Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 8 Aug 2023 13:49:02 +0100 Subject: [PATCH 18/57] Fixing indentation. --- .github/workflows/release-singleimage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-singleimage.yml b/.github/workflows/release-singleimage.yml index f62e4d2a55..2da80a6b29 100644 --- a/.github/workflows/release-singleimage.yml +++ b/.github/workflows/release-singleimage.yml @@ -10,7 +10,7 @@ env: jobs: build-amd64-arm64: name: "build-amd64-arm64" - runs-on: [self-hosted, dev] + runs-on: [self-hosted, dev] strategy: matrix: node-version: [14.x] From 378d3ed40f155855a1903fcc8f630dc567d2e92b Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 8 Aug 2023 12:49:40 +0000 Subject: [PATCH 19/57] Bump version to 2.9.11 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 7506a3606e..88644e88d9 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.10", + "version": "2.9.11", "npmClient": "yarn", "packages": [ "packages/*" From e4841e8f2c608dff521b723799e813a6a3f48c44 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 8 Aug 2023 15:31:05 +0100 Subject: [PATCH 20/57] Removing the usage of the self hosted runners (unavailable in public repo) and attempting to get working using a Docker manifest in parallel. --- .github/workflows/release-selfhost.yml | 2 +- .github/workflows/release-singleimage.yml | 68 +++++++++++++++++++---- 2 files changed, 58 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-selfhost.yml b/.github/workflows/release-selfhost.yml index 1455f0838f..39ee812726 100644 --- a/.github/workflows/release-selfhost.yml +++ b/.github/workflows/release-selfhost.yml @@ -5,7 +5,7 @@ on: jobs: release: - runs-on: [self-hosted, dev] + runs-on: ubuntu-latest steps: - name: Fail if not a tag diff --git a/.github/workflows/release-singleimage.yml b/.github/workflows/release-singleimage.yml index 2da80a6b29..a46099908b 100644 --- a/.github/workflows/release-singleimage.yml +++ b/.github/workflows/release-singleimage.yml @@ -6,14 +6,18 @@ on: env: CI: true PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - REGISTRY_URL: registry.hub.docker.com + REGISTRY_IMAGE: budibase/budibase jobs: - build-amd64-arm64: - name: "build-amd64-arm64" - runs-on: [self-hosted, dev] + build-multiarch: + name: "build-multiarch" + runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: + - 14.x + platform: + - linux/amd64 + - linux/arm64 steps: - name: Fail if not a tag run: | @@ -67,17 +71,61 @@ jobs: uses: docker/build-push-action@v2 with: context: . - push: true - platforms: linux/amd64,linux/arm64 + platforms: ${{ matrix.platform }} tags: budibase/budibase,budibase/budibase:v${{ env.RELEASE_VERSION }} file: ./hosting/single/Dockerfile + outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + - name: Upload digest + uses: actions/upload-artifact@v3 + with: + name: digests + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: ubuntu-latest + needs: + - build-multiarch + steps: + - name: Download digests + uses: actions/download-artifact@v3 + with: + name: digests + path: /tmp/digests + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY_IMAGE }} + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_API_KEY }} + - name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} build-aas: name: "build-aas" - runs-on: [self-hosted, dev] + runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: + - 14.x steps: - name: Fail if not a tag run: | @@ -101,8 +149,6 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - name: Setup QEMU - uses: docker/setup-qemu-action@v1 - name: Setup Docker Buildx id: buildx uses: docker/setup-buildx-action@v1 From 4f5d286f62e5d1c6a9f74c6edd22734f5ae2dddd Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 8 Aug 2023 14:39:04 +0000 Subject: [PATCH 21/57] Bump version to 2.9.12 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 88644e88d9..141491ae69 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.11", + "version": "2.9.12", "npmClient": "yarn", "packages": [ "packages/*" From 0bc7a647dfd278b5b5eb125c89e21eb604038932 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 18:42:39 +0300 Subject: [PATCH 22/57] Types via esbuild --- packages/types/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/types/package.json b/packages/types/package.json index 96ab8cb095..317342e760 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -14,7 +14,7 @@ "license": "GPL-3.0", "scripts": { "prebuild": "rimraf dist/", - "build": "tsc -p tsconfig.build.json", + "build": "node ../../scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "dev:builder": "yarn prebuild && tsc -p tsconfig.json --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null" From b882a64ad756fa9d39e25f7cafaed5578b33f653 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 18:45:02 +0300 Subject: [PATCH 23/57] Shared-core via esbuild --- packages/shared-core/package.json | 2 +- packages/shared-core/tsconfig.build.json | 5 ++++- packages/shared-core/tsconfig.json | 9 --------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index 98ee89999b..61e97ddc76 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -14,7 +14,7 @@ "license": "GPL-3.0", "scripts": { "prebuild": "rimraf dist/", - "build": "tsc -p tsconfig.build.json", + "build": "node ../../scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "dev:builder": "yarn prebuild && tsc -p tsconfig.json --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null" diff --git a/packages/shared-core/tsconfig.build.json b/packages/shared-core/tsconfig.build.json index 6930e3cb99..804e86c270 100644 --- a/packages/shared-core/tsconfig.build.json +++ b/packages/shared-core/tsconfig.build.json @@ -12,7 +12,10 @@ "declaration": true, "types": ["node"], "outDir": "dist", - "skipLibCheck": true + "skipLibCheck": true, + "paths": { + "@budibase/types": ["../../types/src"] + } }, "include": ["**/*.js", "**/*.ts"], "exclude": [ diff --git a/packages/shared-core/tsconfig.json b/packages/shared-core/tsconfig.json index f72933ff9b..33e37179d7 100644 --- a/packages/shared-core/tsconfig.json +++ b/packages/shared-core/tsconfig.json @@ -1,13 +1,4 @@ { "extends": "./tsconfig.build.json", - "compilerOptions": { - "baseUrl": ".", - "rootDir": "./src", - "composite": true, - "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo", - "paths": { - "@budibase/types": ["../../types/src"] - } - }, "exclude": ["node_modules", "dist"] } From bc5b4297a5e552db92dcd95e85aae7aec08c2da6 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 18:56:07 +0300 Subject: [PATCH 24/57] Backend-core via esbuild --- packages/backend-core/package.json | 2 +- packages/backend-core/plugins.ts | 1 - packages/backend-core/scripts/build.js | 8 ++++++++ 3 files changed, 9 insertions(+), 2 deletions(-) delete mode 100644 packages/backend-core/plugins.ts create mode 100644 packages/backend-core/scripts/build.js diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 4631b090fe..25baccbe53 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -14,7 +14,7 @@ "scripts": { "prebuild": "rimraf dist/", "prepack": "cp package.json dist", - "build": "tsc -p tsconfig.build.json", + "build": "node ./scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null", "test": "bash scripts/test.sh", diff --git a/packages/backend-core/plugins.ts b/packages/backend-core/plugins.ts deleted file mode 100644 index 33354eaf64..0000000000 --- a/packages/backend-core/plugins.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./src/plugin" diff --git a/packages/backend-core/scripts/build.js b/packages/backend-core/scripts/build.js new file mode 100644 index 0000000000..992513755a --- /dev/null +++ b/packages/backend-core/scripts/build.js @@ -0,0 +1,8 @@ +#!/usr/bin/node +const { join } = require("path") +const fs = require("fs") +const coreBuild = require("../../../scripts/build") + +coreBuild("./src/plugin/index.ts", "./dist/plugins.js") +coreBuild("./src/index.ts", "./dist/index.js") +coreBuild("./tests/index.ts", "./dist/tests.js") From 5ae100d4cc743fa2825f5d8b369ed2ea7f05a6da Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 18:58:50 +0300 Subject: [PATCH 25/57] Remove unneeded nx deps --- packages/cli/package.json | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 99771adbd3..a0c885657c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -63,20 +63,5 @@ "renamer": "^4.0.0", "ts-node": "^10.9.1", "typescript": "4.7.3" - }, - "nx": { - "targets": { - "build": { - "dependsOn": [ - { - "projects": [ - "@budibase/backend-core", - "@budibase/string-templates" - ], - "target": "build" - } - ] - } - } } } From 93654907c303768ddbe67307347fbf9878823a8f Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 19:08:57 +0300 Subject: [PATCH 26/57] Bundle bb dependencies in backend-core --- packages/backend-core/tsconfig.build.json | 6 +++++- packages/backend-core/tsconfig.json | 8 -------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/backend-core/tsconfig.build.json b/packages/backend-core/tsconfig.build.json index bfbed31e23..c714f4d942 100644 --- a/packages/backend-core/tsconfig.build.json +++ b/packages/backend-core/tsconfig.build.json @@ -12,7 +12,11 @@ "declaration": true, "types": ["node", "jest"], "outDir": "dist", - "skipLibCheck": true + "skipLibCheck": true, + "paths": { + "@budibase/types": ["../types/src"], + "@budibase/shared-core": ["../shared-core/src"] + } }, "include": ["**/*.js", "**/*.ts"], "exclude": [ diff --git a/packages/backend-core/tsconfig.json b/packages/backend-core/tsconfig.json index 128814b955..33e37179d7 100644 --- a/packages/backend-core/tsconfig.json +++ b/packages/backend-core/tsconfig.json @@ -1,12 +1,4 @@ { "extends": "./tsconfig.build.json", - "compilerOptions": { - "composite": true, - "baseUrl": ".", - "paths": { - "@budibase/types": ["../types/src"], - "@budibase/shared-core": ["../shared-core/src"] - } - }, "exclude": ["node_modules", "dist"] } From df29a79a68139f295cfb9e15c2303875c373a65b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 8 Aug 2023 17:26:02 +0100 Subject: [PATCH 27/57] Attempting to get push by digest working correctly for single image build. --- .github/workflows/release-singleimage.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-singleimage.yml b/.github/workflows/release-singleimage.yml index a46099908b..6c0a873c8b 100644 --- a/.github/workflows/release-singleimage.yml +++ b/.github/workflows/release-singleimage.yml @@ -6,7 +6,6 @@ on: env: CI: true PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - REGISTRY_IMAGE: budibase/budibase jobs: build-multiarch: name: "build-multiarch" @@ -72,9 +71,9 @@ jobs: with: context: . platforms: ${{ matrix.platform }} - tags: budibase/budibase,budibase/budibase:v${{ env.RELEASE_VERSION }} + tags: budibase/budibase,budibase/budibase:${{ env.RELEASE_VERSION }} file: ./hosting/single/Dockerfile - outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true + outputs: type=image,name=budibase/budibase,push-by-digest=true,name-canonical=true,push=true - name: Export digest run: | mkdir -p /tmp/digests @@ -104,7 +103,7 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ${{ env.REGISTRY_IMAGE }} + images: budibase/budibase - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -114,10 +113,10 @@ jobs: working-directory: /tmp/digests run: | docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + $(printf 'budibase/budibase@sha256:%s ' *) - name: Inspect image run: | - docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} + docker buildx imagetools inspect budibase/budibase:${{ steps.meta.outputs.version }} build-aas: name: "build-aas" From e468ff066f85a74e36ed607fb117289be4be7010 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 8 Aug 2023 16:26:25 +0000 Subject: [PATCH 28/57] Bump version to 2.9.13 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 141491ae69..31ec0c9979 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.12", + "version": "2.9.13", "npmClient": "yarn", "packages": [ "packages/*" From b91677f0ceb234428f48e16c6bd453dd014019c7 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 19:33:57 +0300 Subject: [PATCH 29/57] Fix declarations --- packages/backend-core/package.json | 2 +- packages/shared-core/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 25baccbe53..65577cf4d8 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -14,7 +14,7 @@ "scripts": { "prebuild": "rimraf dist/", "prepack": "cp package.json dist", - "build": "node ./scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly", + "build": "node ./scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly --paths null", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null", "test": "bash scripts/test.sh", diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index 61e97ddc76..4e7d568fcb 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -14,7 +14,7 @@ "license": "GPL-3.0", "scripts": { "prebuild": "rimraf dist/", - "build": "node ../../scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly", + "build": "node ../../scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly --paths null", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "dev:builder": "yarn prebuild && tsc -p tsconfig.json --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null" From a213475041722c66f5503f5e21a4d5ab3149f9a5 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 19:34:20 +0300 Subject: [PATCH 30/57] Esbuild, build esm --- scripts/build.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/build.js b/scripts/build.js index b93ae1bbe6..966d5f158c 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -59,9 +59,16 @@ function runBuild(entry, outfile) { ], } + const { compilerOptions } = tsconfigPathPluginContent + const format = + compilerOptions.target === "es6" && compilerOptions.module !== "commonjs" + ? "esm" + : undefined + build({ ...sharedConfig, platform: "node", + format, outfile, }).then(result => { glob(`${process.cwd()}/src/**/*.hbs`, {}, (err, files) => { From 8e655dae6624d9d11cd40b63a18108b460fad317 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 19:36:36 +0300 Subject: [PATCH 31/57] Fix path --- packages/shared-core/tsconfig.build.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared-core/tsconfig.build.json b/packages/shared-core/tsconfig.build.json index 804e86c270..31dc1afc10 100644 --- a/packages/shared-core/tsconfig.build.json +++ b/packages/shared-core/tsconfig.build.json @@ -14,7 +14,7 @@ "outDir": "dist", "skipLibCheck": true, "paths": { - "@budibase/types": ["../../types/src"] + "@budibase/types": ["../types/src"] } }, "include": ["**/*.js", "**/*.ts"], From da87b28155596dc54945dfadca09c72677f05405 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 8 Aug 2023 19:39:32 +0300 Subject: [PATCH 32/57] Clean nx deps --- packages/bbui/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 8a9318ba94..0b87960ab5 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -98,8 +98,7 @@ { "projects": [ "@budibase/string-templates", - "@budibase/shared-core", - "@budibase/types" + "@budibase/shared-core" ], "target": "build" } From f754691563bd02db803c64053fcb3004b4f6c2cb Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 8 Aug 2023 17:39:51 +0100 Subject: [PATCH 33/57] Reverting the changes to the single image build fully, adding in a workflow which should increase the storage capacity of the VM, almost doubling it (although it is a bit hacky, should get us by for a while). --- .github/workflows/release-singleimage.yml | 124 +++------------------- 1 file changed, 15 insertions(+), 109 deletions(-) diff --git a/.github/workflows/release-singleimage.yml b/.github/workflows/release-singleimage.yml index 6c0a873c8b..b81d04d089 100644 --- a/.github/workflows/release-singleimage.yml +++ b/.github/workflows/release-singleimage.yml @@ -1,4 +1,4 @@ -name: release-singleimage +name: Deploy Budibase Single Container Image to DockerHub on: workflow_dispatch: @@ -6,18 +6,20 @@ on: env: CI: true PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + REGISTRY_URL: registry.hub.docker.com jobs: - build-multiarch: - name: "build-multiarch" + build: + name: "build" runs-on: ubuntu-latest strategy: matrix: - node-version: - - 14.x - platform: - - linux/amd64 - - linux/arm64 + node-version: [14.x] steps: + - name: Maximize build space + uses: easimon/maximize-build-space@master + with: + root-reserve-mb: 512 + swap-size-mb: 1024 - name: Fail if not a tag run: | if [[ $GITHUB_REF != refs/tags/* ]]; then @@ -30,12 +32,14 @@ jobs: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} fetch-depth: 0 + - name: Fail if tag is not in master run: | if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch" exit 1 fi + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: @@ -70,108 +74,10 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: ${{ matrix.platform }} + push: true + platforms: linux/amd64,linux/arm64 tags: budibase/budibase,budibase/budibase:${{ env.RELEASE_VERSION }} file: ./hosting/single/Dockerfile - outputs: type=image,name=budibase/budibase,push-by-digest=true,name-canonical=true,push=true - - name: Export digest - run: | - mkdir -p /tmp/digests - digest="${{ steps.build.outputs.digest }}" - touch "/tmp/digests/${digest#sha256:}" - - name: Upload digest - uses: actions/upload-artifact@v3 - with: - name: digests - path: /tmp/digests/* - if-no-files-found: error - retention-days: 1 - - merge: - runs-on: ubuntu-latest - needs: - - build-multiarch - steps: - - name: Download digests - uses: actions/download-artifact@v3 - with: - name: digests - path: /tmp/digests - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: budibase/budibase - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_API_KEY }} - - name: Create manifest list and push - working-directory: /tmp/digests - run: | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf 'budibase/budibase@sha256:%s ' *) - - name: Inspect image - run: | - docker buildx imagetools inspect budibase/budibase:${{ steps.meta.outputs.version }} - - build-aas: - name: "build-aas" - runs-on: ubuntu-latest - strategy: - matrix: - node-version: - - 14.x - steps: - - name: Fail if not a tag - run: | - if [[ $GITHUB_REF != refs/tags/* ]]; then - echo "Workflow Dispatch can only be run on tags" - exit 1 - fi - - name: "Checkout" - uses: actions/checkout@v2 - with: - submodules: true - token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - fetch-depth: 0 - - name: Fail if tag is not in master - run: | - if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then - echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch" - exit 1 - fi - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Setup Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - name: Run Yarn - run: yarn - - name: Update versions - run: ./scripts/updateVersions.sh - - name: Runt Yarn Lint - run: yarn lint - - name: Update versions - run: ./scripts/updateVersions.sh - - name: Run Yarn Build - run: yarn build:docker:pre - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_API_KEY }} - - name: Get the latest release version - id: version - run: | - release_version=$(cat lerna.json | jq -r '.version') - echo $release_version - echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV - name: Tag and release Budibase Azure App Service docker image uses: docker/build-push-action@v2 with: @@ -180,4 +86,4 @@ jobs: platforms: linux/amd64 build-args: TARGETBUILD=aas tags: budibase/budibase-aas,budibase/budibase-aas:${{ env.RELEASE_VERSION }} - file: ./hosting/single/Dockerfile + file: ./hosting/single/Dockerfile \ No newline at end of file From 85903a2a30d42b62eedd5d249089fcf3caf75f93 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 8 Aug 2023 16:59:53 +0000 Subject: [PATCH 34/57] Bump version to 2.9.14 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 31ec0c9979..93db547474 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.13", + "version": "2.9.14", "npmClient": "yarn", "packages": [ "packages/*" From c21da4fbd3a4529477e3993ce375dbd484f2d73b Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 9 Aug 2023 11:40:54 +0300 Subject: [PATCH 35/57] Consume packages from builder --- packages/builder/package.json | 12 +++--------- packages/builder/vite.config.js | 8 ++++++++ scripts/build.js | 5 ----- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index 56834f79dd..db8ef86086 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -133,9 +133,7 @@ "dependsOn": [ { "projects": [ - "@budibase/shared-core", - "@budibase/string-templates", - "@budibase/types" + "@budibase/string-templates" ], "target": "build" } @@ -145,9 +143,7 @@ "dependsOn": [ { "projects": [ - "@budibase/shared-core", - "@budibase/string-templates", - "@budibase/types" + "@budibase/string-templates" ], "target": "build" } @@ -157,9 +153,7 @@ "dependsOn": [ { "projects": [ - "@budibase/shared-core", - "@budibase/string-templates", - "@budibase/types" + "@budibase/string-templates" ], "target": "build" } diff --git a/packages/builder/vite.config.js b/packages/builder/vite.config.js index 4a0ffca8d4..b7af647916 100644 --- a/packages/builder/vite.config.js +++ b/packages/builder/vite.config.js @@ -127,6 +127,14 @@ export default defineConfig(({ mode }) => { find: "helpers", replacement: path.resolve("./src/helpers"), }, + { + find: "@budibase/types", + replacement: path.resolve("../types/src"), + }, + { + find: "@budibase/shared-core", + replacement: path.resolve("../shared-core/src"), + }, ], }, } diff --git a/scripts/build.js b/scripts/build.js index 966d5f158c..86f3fb55b9 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -60,15 +60,10 @@ function runBuild(entry, outfile) { } const { compilerOptions } = tsconfigPathPluginContent - const format = - compilerOptions.target === "es6" && compilerOptions.module !== "commonjs" - ? "esm" - : undefined build({ ...sharedConfig, platform: "node", - format, outfile, }).then(result => { glob(`${process.cwd()}/src/**/*.hbs`, {}, (err, files) => { From 029b9d7b342b131af334d5fc4f1b7aa3c8f1890c Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 9 Aug 2023 11:46:23 +0300 Subject: [PATCH 36/57] Clean --- scripts/build.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index 86f3fb55b9..b93ae1bbe6 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -59,8 +59,6 @@ function runBuild(entry, outfile) { ], } - const { compilerOptions } = tsconfigPathPluginContent - build({ ...sharedConfig, platform: "node", From 32e09cf131ece2eb67e3fb83f3bbb69660690e6a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 9 Aug 2023 12:13:38 +0300 Subject: [PATCH 37/57] Lint --- packages/backend-core/scripts/build.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/backend-core/scripts/build.js b/packages/backend-core/scripts/build.js index 992513755a..bd00cbc7ff 100644 --- a/packages/backend-core/scripts/build.js +++ b/packages/backend-core/scripts/build.js @@ -1,6 +1,4 @@ #!/usr/bin/node -const { join } = require("path") -const fs = require("fs") const coreBuild = require("../../../scripts/build") coreBuild("./src/plugin/index.ts", "./dist/plugins.js") From a5fb25e41ec179f8d879267ae6e8304b6ce20706 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:38:04 +0100 Subject: [PATCH 38/57] Allow null for firstName and lastName (#11482) --- packages/worker/src/api/routes/validation/users.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/worker/src/api/routes/validation/users.ts b/packages/worker/src/api/routes/validation/users.ts index 30a3d67434..dfc1e6fbbf 100644 --- a/packages/worker/src/api/routes/validation/users.ts +++ b/packages/worker/src/api/routes/validation/users.ts @@ -1,12 +1,14 @@ import { auth } from "@budibase/backend-core" import Joi from "joi" +const OPTIONAL_STRING = Joi.string().allow(null, "") + let schema: any = { - email: Joi.string().allow(null, ""), - password: Joi.string().allow(null, ""), + email: OPTIONAL_STRING, + password: OPTIONAL_STRING, forceResetPassword: Joi.boolean().optional(), - firstName: Joi.string().allow(null, ""), - lastName: Joi.string().allow(null, ""), + firstName: OPTIONAL_STRING, + lastName: OPTIONAL_STRING, builder: Joi.object({ global: Joi.boolean().optional(), apps: Joi.array().optional(), @@ -21,8 +23,8 @@ export const buildSelfSaveValidation = () => { schema = { password: Joi.string().optional(), forceResetPassword: Joi.boolean().optional(), - firstName: Joi.string().allow("").optional(), - lastName: Joi.string().allow("").optional(), + firstName: OPTIONAL_STRING, + lastName: OPTIONAL_STRING, onboardedAt: Joi.string().optional(), } return auth.joiValidator.body(Joi.object(schema).required().unknown(false)) From 0fc1f13daad722505d5eea904d90acad66e8822a Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 9 Aug 2023 09:38:26 +0000 Subject: [PATCH 39/57] Bump version to 2.9.15 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 93db547474..9a9c4ec560 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.14", + "version": "2.9.15", "npmClient": "yarn", "packages": [ "packages/*" From c1438b2988ca1459781d1617c15c2152affb77b5 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 9 Aug 2023 10:57:05 +0100 Subject: [PATCH 40/57] Attempting to get maximise storage working for our use case. --- .github/workflows/release-singleimage.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-singleimage.yml b/.github/workflows/release-singleimage.yml index b81d04d089..7f1cf94704 100644 --- a/.github/workflows/release-singleimage.yml +++ b/.github/workflows/release-singleimage.yml @@ -18,8 +18,9 @@ jobs: - name: Maximize build space uses: easimon/maximize-build-space@master with: - root-reserve-mb: 512 + root-reserve-mb: 4096 swap-size-mb: 1024 + remove-android: 'true' - name: Fail if not a tag run: | if [[ $GITHUB_REF != refs/tags/* ]]; then @@ -86,4 +87,4 @@ jobs: platforms: linux/amd64 build-args: TARGETBUILD=aas tags: budibase/budibase-aas,budibase/budibase-aas:${{ env.RELEASE_VERSION }} - file: ./hosting/single/Dockerfile \ No newline at end of file + file: ./hosting/single/Dockerfile From af2a2f4f056cead50f9f8c4cb25a0dc1eebecb20 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 9 Aug 2023 09:58:01 +0000 Subject: [PATCH 41/57] Bump version to 2.9.16 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 9a9c4ec560..bc5c78d3f3 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.15", + "version": "2.9.16", "npmClient": "yarn", "packages": [ "packages/*" From fd677e5a866233baaa57573706ba301d7e5b8e25 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 9 Aug 2023 10:13:41 +0000 Subject: [PATCH 42/57] Bump version to 2.9.17 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index bc5c78d3f3..d48dbc4b86 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.16", + "version": "2.9.17", "npmClient": "yarn", "packages": [ "packages/*" From b5e4fdec8d886035fcfe5aa42c662e9148ed79f9 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 9 Aug 2023 11:35:35 +0100 Subject: [PATCH 43/57] Up-ing root size. --- .github/workflows/release-singleimage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-singleimage.yml b/.github/workflows/release-singleimage.yml index 7f1cf94704..b879b519d2 100644 --- a/.github/workflows/release-singleimage.yml +++ b/.github/workflows/release-singleimage.yml @@ -18,9 +18,10 @@ jobs: - name: Maximize build space uses: easimon/maximize-build-space@master with: - root-reserve-mb: 4096 + root-reserve-mb: 35000 swap-size-mb: 1024 remove-android: 'true' + remove-dotnet: 'true' - name: Fail if not a tag run: | if [[ $GITHUB_REF != refs/tags/* ]]; then From 56c82cc6971bfb178095ec30cbb38d74d8e55cd0 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 9 Aug 2023 10:35:58 +0000 Subject: [PATCH 44/57] Bump version to 2.9.18 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index d48dbc4b86..d506ef3022 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.17", + "version": "2.9.18", "npmClient": "yarn", "packages": [ "packages/*" From 9f842234dc551fb749f4c0b2b0b5f1bcaa94eca6 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 9 Aug 2023 10:40:10 +0000 Subject: [PATCH 45/57] Bump version to 2.9.19-alpha.0 --- lerna.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lerna.json b/lerna.json index ed343f9d5e..620924d95e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.18", + "version": "2.9.19-alpha.0", "npmClient": "yarn", "packages": [ "packages/*" @@ -19,4 +19,4 @@ "loadEnvFiles": false } } -} +} \ No newline at end of file From f55aed2ee524519c0b7c4ba1e337494a1d1dbca5 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 9 Aug 2023 13:31:30 +0100 Subject: [PATCH 46/57] Adding NPM ignore files so that doesn't default to the .gitignore when publishing to NPM. --- packages/backend-core/.npmignore | 7 +++++++ packages/shared-core/.npmignore | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 packages/backend-core/.npmignore create mode 100644 packages/shared-core/.npmignore diff --git a/packages/backend-core/.npmignore b/packages/backend-core/.npmignore new file mode 100644 index 0000000000..d1b8eaa79b --- /dev/null +++ b/packages/backend-core/.npmignore @@ -0,0 +1,7 @@ +node_modules/ +tsconfig.build.json +tsconfig.json +jest.config.ts +jest-testcontainers-config.js +__mocks__ +scripts diff --git a/packages/shared-core/.npmignore b/packages/shared-core/.npmignore new file mode 100644 index 0000000000..4926fbc5fd --- /dev/null +++ b/packages/shared-core/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +tsconfig.build.json +tsconfig.json From ea3f4e8126c661d3a054d667a588de2209976c61 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 9 Aug 2023 12:44:41 +0000 Subject: [PATCH 47/57] Bump version to 2.9.19 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index d506ef3022..8ec6eddf37 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.18", + "version": "2.9.19", "npmClient": "yarn", "packages": [ "packages/*" From bfdb7854364f10bbf680ef66e9b451f58bd93fe6 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 9 Aug 2023 16:36:14 +0300 Subject: [PATCH 48/57] Tweak shared-core content to exclude src --- packages/shared-core/.npmignore | 8 +++++--- packages/shared-core/package.json | 10 ++-------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/shared-core/.npmignore b/packages/shared-core/.npmignore index 4926fbc5fd..268f19d4fe 100644 --- a/packages/shared-core/.npmignore +++ b/packages/shared-core/.npmignore @@ -1,3 +1,5 @@ -node_modules/ -tsconfig.build.json -tsconfig.json +* +!dist/* +dist/tsconfig.build.tsbuildinfo +!package.json +!LICENCE \ No newline at end of file diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index 4e7d568fcb..b097a46c57 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -2,14 +2,8 @@ "name": "@budibase/shared-core", "version": "0.0.0", "description": "Shared data utils", - "main": "src/index.ts", - "types": "src/index.ts", - "exports": { - ".": { - "import": "./dist/index.js", - "require": "./src/index.ts" - } - }, + "main": "dist/index.js", + "types": "dist/index.d.ts", "author": "Budibase", "license": "GPL-3.0", "scripts": { From 90398ced3e8cac5f046fa35445a482a243d7a553 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 9 Aug 2023 16:37:31 +0300 Subject: [PATCH 49/57] Tweak types npm content --- packages/types/.npmignore | 5 +++++ packages/types/package.json | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 packages/types/.npmignore diff --git a/packages/types/.npmignore b/packages/types/.npmignore new file mode 100644 index 0000000000..268f19d4fe --- /dev/null +++ b/packages/types/.npmignore @@ -0,0 +1,5 @@ +* +!dist/* +dist/tsconfig.build.tsbuildinfo +!package.json +!LICENCE \ No newline at end of file diff --git a/packages/types/package.json b/packages/types/package.json index 317342e760..bb0163ae13 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -2,14 +2,8 @@ "name": "@budibase/types", "version": "0.0.0", "description": "Budibase types", - "main": "src/index.ts", - "types": "src/index.ts", - "exports": { - ".": { - "import": "./dist/index.js", - "require": "./src/index.ts" - } - }, + "main": "dist/index.js", + "types": "dist/index.d.ts", "author": "Budibase", "license": "GPL-3.0", "scripts": { From 4c7dfc978e94d80beba303002008026f7990e73e Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 9 Aug 2023 16:41:44 +0300 Subject: [PATCH 50/57] Whitelist .npmignore from backend-core --- packages/backend-core/.npmignore | 11 ++++------- packages/shared-core/.npmignore | 3 +-- packages/types/.npmignore | 3 +-- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/packages/backend-core/.npmignore b/packages/backend-core/.npmignore index d1b8eaa79b..967c7d11da 100644 --- a/packages/backend-core/.npmignore +++ b/packages/backend-core/.npmignore @@ -1,7 +1,4 @@ -node_modules/ -tsconfig.build.json -tsconfig.json -jest.config.ts -jest-testcontainers-config.js -__mocks__ -scripts +* +!dist/* +dist/tsconfig.build.tsbuildinfo +!package.json \ No newline at end of file diff --git a/packages/shared-core/.npmignore b/packages/shared-core/.npmignore index 268f19d4fe..967c7d11da 100644 --- a/packages/shared-core/.npmignore +++ b/packages/shared-core/.npmignore @@ -1,5 +1,4 @@ * !dist/* dist/tsconfig.build.tsbuildinfo -!package.json -!LICENCE \ No newline at end of file +!package.json \ No newline at end of file diff --git a/packages/types/.npmignore b/packages/types/.npmignore index 268f19d4fe..967c7d11da 100644 --- a/packages/types/.npmignore +++ b/packages/types/.npmignore @@ -1,5 +1,4 @@ * !dist/* dist/tsconfig.build.tsbuildinfo -!package.json -!LICENCE \ No newline at end of file +!package.json \ No newline at end of file From b441cbe3ec707acce77ac4219eeae4efd7bbde71 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 9 Aug 2023 17:06:05 +0300 Subject: [PATCH 51/57] Include all dist --- packages/backend-core/.npmignore | 2 +- packages/shared-core/.npmignore | 2 +- packages/types/.npmignore | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend-core/.npmignore b/packages/backend-core/.npmignore index 967c7d11da..fb547825eb 100644 --- a/packages/backend-core/.npmignore +++ b/packages/backend-core/.npmignore @@ -1,4 +1,4 @@ * -!dist/* +!dist/**/* dist/tsconfig.build.tsbuildinfo !package.json \ No newline at end of file diff --git a/packages/shared-core/.npmignore b/packages/shared-core/.npmignore index 967c7d11da..fb547825eb 100644 --- a/packages/shared-core/.npmignore +++ b/packages/shared-core/.npmignore @@ -1,4 +1,4 @@ * -!dist/* +!dist/**/* dist/tsconfig.build.tsbuildinfo !package.json \ No newline at end of file diff --git a/packages/types/.npmignore b/packages/types/.npmignore index 967c7d11da..fb547825eb 100644 --- a/packages/types/.npmignore +++ b/packages/types/.npmignore @@ -1,4 +1,4 @@ * -!dist/* +!dist/**/* dist/tsconfig.build.tsbuildinfo !package.json \ No newline at end of file From 9734776953e98f7c01b600dfbb1d17394652c5e7 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 9 Aug 2023 17:20:36 +0300 Subject: [PATCH 52/57] Add required nx dependencies --- packages/backend-core/package.json | 15 +++++++++++++++ packages/shared-core/package.json | 14 ++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 65577cf4d8..04efe7f5c6 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -88,5 +88,20 @@ "ts-node": "10.8.1", "tsconfig-paths": "4.0.0", "typescript": "4.7.3" + }, + "nx": { + "targets": { + "build": { + "dependsOn": [ + { + "projects": [ + "@budibase/shared-core", + "@budibase/types" + ], + "target": "build" + } + ] + } + } } } diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index b097a46c57..382f3fa731 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -20,5 +20,19 @@ "concurrently": "^7.6.0", "rimraf": "3.0.2", "typescript": "4.7.3" + }, + "nx": { + "targets": { + "build": { + "dependsOn": [ + { + "projects": [ + "@budibase/types" + ], + "target": "build" + } + ] + } + } } } From 7c12280fe398bce4ef0b3e2c22ef852d344c0f69 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 9 Aug 2023 14:34:26 +0000 Subject: [PATCH 53/57] Bump version to 2.9.20 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 8ec6eddf37..9d89818cbd 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.19", + "version": "2.9.20", "npmClient": "yarn", "packages": [ "packages/*" From 1c6b17ee326883aa3e4e545495210f411d1a287e Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 9 Aug 2023 18:02:45 +0300 Subject: [PATCH 54/57] Use affected only on PRs, excluding master --- .github/workflows/budibase_ci.yml | 43 ++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index cc1244e01a..af135b757b 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -18,7 +18,8 @@ env: BRANCH: ${{ github.event.pull_request.head.ref }} BASE_BRANCH: ${{ github.event.pull_request.base.ref}} PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - NX_BASE_BRANCH: origin/${{ github.base_ref || 'master'}} + NX_BASE_BRANCH: origin/${{ github.base_ref }} + USE_NX_AFFECTED: ${{ github.event_name == 'pull_request' && github.base_ref != 'master'}} jobs: lint: @@ -66,9 +67,21 @@ jobs: - run: yarn --frozen-lockfile # Run build all the projects - - run: yarn build --since=${{ env.NX_BASE_BRANCH }} + - name: Build + run: | + if [[ ${{ env.USE_NX_AFFECTED }} ]]; then + yarn build --since=${{ env.NX_BASE_BRANCH }} + else + yarn build + fi # Check the types of the projects built via esbuild - - run: yarn check:types --since=${{ env.NX_BASE_BRANCH }} + - name: Check types + run: | + if [[ ${{ env.USE_NX_AFFECTED }} ]]; then + yarn check:types --since=${{ env.NX_BASE_BRANCH }} + else + yarn check:types + fi test-libraries: runs-on: ubuntu-latest @@ -92,7 +105,13 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile - - run: yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} + - name: Test + run: | + if [[ ${{ env.USE_NX_AFFECTED }} ]]; then + yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} + else + yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro + fi - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos @@ -122,7 +141,13 @@ jobs: cache: "yarn" - run: yarn --frozen-lockfile - name: Test worker and server - run: yarn test --scope=@budibase/worker --scope=@budibase/server --since=${{ env.NX_BASE_BRANCH }} + run: | + if [[ ${{ env.USE_NX_AFFECTED }} ]]; then + yarn test --scope=@budibase/worker --scope=@budibase/server --since=${{ env.NX_BASE_BRANCH }} + else + yarn test --scope=@budibase/worker --scope=@budibase/server + fi + - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN || github.token }} # not required for public repos @@ -146,7 +171,13 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn --frozen-lockfile - - run: yarn test --scope=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} + - name: Test + run: | + if [[ ${{ env.USE_NX_AFFECTED }} ]]; then + yarn test --scope=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} + else + yarn test --scope=@budibase/pro + fi integration-test: runs-on: ubuntu-latest From dbfdc242d1afcb7952ecb5366a43722521448213 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 9 Aug 2023 15:25:47 +0000 Subject: [PATCH 55/57] Bump version to 2.9.21-alpha.0 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 9d89818cbd..eb3f1bd6aa 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.20", + "version": "2.9.21-alpha.0", "npmClient": "yarn", "packages": [ "packages/*" From fb4b439f7b10f0c2a3ac7410e4158ca46f3080c0 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 10 Aug 2023 11:10:47 +0300 Subject: [PATCH 56/57] Fix ifs --- .github/workflows/budibase_ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index af135b757b..a94c56407f 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -69,7 +69,7 @@ jobs: # Run build all the projects - name: Build run: | - if [[ ${{ env.USE_NX_AFFECTED }} ]]; then + if ${{ env.USE_NX_AFFECTED }}; then yarn build --since=${{ env.NX_BASE_BRANCH }} else yarn build @@ -77,7 +77,7 @@ jobs: # Check the types of the projects built via esbuild - name: Check types run: | - if [[ ${{ env.USE_NX_AFFECTED }} ]]; then + if ${{ env.USE_NX_AFFECTED }}; then yarn check:types --since=${{ env.NX_BASE_BRANCH }} else yarn check:types @@ -107,7 +107,7 @@ jobs: - run: yarn --frozen-lockfile - name: Test run: | - if [[ ${{ env.USE_NX_AFFECTED }} ]]; then + if ${{ env.USE_NX_AFFECTED }}; then yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} else yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro @@ -142,7 +142,7 @@ jobs: - run: yarn --frozen-lockfile - name: Test worker and server run: | - if [[ ${{ env.USE_NX_AFFECTED }} ]]; then + if ${{ env.USE_NX_AFFECTED }}; then yarn test --scope=@budibase/worker --scope=@budibase/server --since=${{ env.NX_BASE_BRANCH }} else yarn test --scope=@budibase/worker --scope=@budibase/server @@ -173,7 +173,7 @@ jobs: - run: yarn --frozen-lockfile - name: Test run: | - if [[ ${{ env.USE_NX_AFFECTED }} ]]; then + if ${{ env.USE_NX_AFFECTED }}; then yarn test --scope=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} else yarn test --scope=@budibase/pro From 97e64b88aabd7ac9367f8eaa3b7ded3e8e7a6cd2 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Thu, 10 Aug 2023 08:23:37 +0000 Subject: [PATCH 57/57] Bump version to 2.9.21-alpha.1 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index eb3f1bd6aa..a7edba2921 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.21-alpha.0", + "version": "2.9.21-alpha.1", "npmClient": "yarn", "packages": [ "packages/*"