From c3a708b7cbfb3c634a75bfdb3b0ea671d28ca443 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Fri, 16 Aug 2024 13:50:48 +0530 Subject: [PATCH 01/13] Test update to the core feature --- .../components/advanced-search-with-basic-filters.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/admin.core.v1/components/advanced-search-with-basic-filters.tsx b/features/admin.core.v1/components/advanced-search-with-basic-filters.tsx index 0a824d1c9e0..7b4d6927d96 100644 --- a/features/admin.core.v1/components/advanced-search-with-basic-filters.tsx +++ b/features/admin.core.v1/components/advanced-search-with-basic-filters.tsx @@ -16,6 +16,8 @@ * under the License. */ + + import { commonConfig } from "@wso2is/admin.extensions.v1"; import { TestableComponentInterface } from "@wso2is/core/models"; import { SearchUtils } from "@wso2is/core/utils"; From 335250e424f0e82242a0de445cf265a33d7a4e03 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Fri, 16 Aug 2024 13:53:05 +0530 Subject: [PATCH 02/13] Improve pnpm clean command for identity-apps-core --- identity-apps-core/package.json | 8 ++++---- identity-apps-core/theme-distribute.js | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/identity-apps-core/package.json b/identity-apps-core/package.json index d6121dfb093..7e11c52f427 100644 --- a/identity-apps-core/package.json +++ b/identity-apps-core/package.json @@ -7,10 +7,10 @@ "license": "Apache-2.0", "scripts": { "build": "pnpm nx run theme:build && node theme-distribute.js", - "clean": "pnpm clean:lock-files && pnpm clean:maven-folders && pnpm clean:node-modules", - "clean:lock-files": "pnpm rimraf package-lock.json && pnpm rimraf pnpm-lock.yaml && pnpm rimraf yarn.lock", - "clean:maven-folders": "pnpm rimraf target", - "clean:node-modules": "pnpm rimraf node_modules" + "clean": "pnpm clean:theme-folders && pnpm clean:node-modules && pnpm clean:maven-folders", + "clean:maven-folders": "mvn clean", + "clean:node-modules": "pnpm rimraf node_modules", + "clean:theme-folders": "node theme-distribute.js clean" }, "dependencies": { "@wso2is/theme": "^2.1.4", diff --git a/identity-apps-core/theme-distribute.js b/identity-apps-core/theme-distribute.js index a09d3ad43ae..5a525d210ca 100644 --- a/identity-apps-core/theme-distribute.js +++ b/identity-apps-core/theme-distribute.js @@ -50,4 +50,12 @@ async function main() { } } -main(); +// Parse command-line arguments. +const args = process.argv.slice(2); + +// Check which function to run based on the arguments. +if (args.includes("clean")) { + deleteExistingThemesFolder().catch(console.error); +} else { + main().catch(console.error); +} From 80258bfaff626d51fe5c3e3907fafc4af6a2d915 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Fri, 16 Aug 2024 13:54:10 +0530 Subject: [PATCH 03/13] Update build script for identity-apps-core --- identity-apps-core/package.json | 3 ++- identity-apps-core/pom.xml | 20 +++----------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/identity-apps-core/package.json b/identity-apps-core/package.json index 7e11c52f427..11f2c740299 100644 --- a/identity-apps-core/package.json +++ b/identity-apps-core/package.json @@ -6,7 +6,8 @@ "author": "WSO2", "license": "Apache-2.0", "scripts": { - "build": "pnpm nx run theme:build && node theme-distribute.js", + "build": "mvn clean install", + "build:theme": "pnpm nx run theme:build && node theme-distribute.js", "clean": "pnpm clean:theme-folders && pnpm clean:node-modules && pnpm clean:maven-folders", "clean:maven-folders": "mvn clean", "clean:node-modules": "pnpm rimraf node_modules", diff --git a/identity-apps-core/pom.xml b/identity-apps-core/pom.xml index 32f88432dcb..46b34193455 100644 --- a/identity-apps-core/pom.xml +++ b/identity-apps-core/pom.xml @@ -581,7 +581,7 @@ - + org.codehaus.mojo 1.6.0 @@ -603,21 +603,7 @@ ${basedir} - - run-linter - - exec - - process-resources - - pnpm - - lint - - ${lint.exec.skip} - ${basedir} - - + npm run build (compile) @@ -627,7 +613,7 @@ pnpm - build + build:theme ${basedir} From 74925d57baec25ab34c8b17665e5f65898185381 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Fri, 16 Aug 2024 14:00:39 +0530 Subject: [PATCH 04/13] Remove test change --- .../components/advanced-search-with-basic-filters.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/features/admin.core.v1/components/advanced-search-with-basic-filters.tsx b/features/admin.core.v1/components/advanced-search-with-basic-filters.tsx index 7b4d6927d96..0a824d1c9e0 100644 --- a/features/admin.core.v1/components/advanced-search-with-basic-filters.tsx +++ b/features/admin.core.v1/components/advanced-search-with-basic-filters.tsx @@ -16,8 +16,6 @@ * under the License. */ - - import { commonConfig } from "@wso2is/admin.extensions.v1"; import { TestableComponentInterface } from "@wso2is/core/models"; import { SearchUtils } from "@wso2is/core/utils"; From 03abd96746dbe2f4d5a07517cc5e1525d361a23b Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Fri, 16 Aug 2024 14:20:08 +0530 Subject: [PATCH 05/13] Update PR builder with nx affected --- .github/workflows/pr-builder.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index f9b7834d332..47f34d1bec2 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -239,6 +239,8 @@ jobs: - name: ⬇️ Checkout id: checkout uses: actions/checkout@v2.3.3 + with: + fetch-depth: 0 - name: 🟢 Setup node id: setup-node @@ -246,6 +248,12 @@ jobs: with: node-version: ${{ matrix.node-version }} + - name: 🐳 Set SHAs for Nx + id: set-shas + uses: nrwl/nx-set-shas@v3 + with: + main-branch-name: "master" + - name: ☕ Set up JDK 11 id: jdk-setup uses: actions/setup-java@v3 @@ -286,13 +294,7 @@ jobs: - name: 👷 PNPM Build id: build-with-pnpm - run: pnpm build - - - name: 🏗️ Maven Build identity-apps-core - id: build-with-maven - run: | - cd identity-apps-core - mvn clean install -U -Dlint.exec.skip=true -Dbootstrap.exec.skip=true + run: pnpm nx affected --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }} --target=build --parallel=3 - name: 💾 Cache local Maven repository id: cache-maven-m2 From 4f6088a1634e0c6a18c8117408bd5da4dce039c8 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Fri, 16 Aug 2024 15:29:22 +0530 Subject: [PATCH 06/13] Improve PR-builder --- .github/workflows/pr-builder.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index 47f34d1bec2..a619e1c4cae 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -240,7 +240,12 @@ jobs: id: checkout uses: actions/checkout@v2.3.3 with: - fetch-depth: 0 + fetch-depth: 1 + + - name: ⬇️ Fetch the latest commit from master branch + run: | + git fetch origin master:refs/remotes/origin/master + git fetch origin master --depth=1 - name: 🟢 Setup node id: setup-node From 96ff753b37bc601fb373ee2f00db5ececc4eb765 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Fri, 16 Aug 2024 15:29:34 +0530 Subject: [PATCH 07/13] Fix lint issues --- identity-apps-core/theme-distribute.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/identity-apps-core/theme-distribute.js b/identity-apps-core/theme-distribute.js index 5a525d210ca..100bbd536d0 100644 --- a/identity-apps-core/theme-distribute.js +++ b/identity-apps-core/theme-distribute.js @@ -15,6 +15,7 @@ * specific language governing permissions and limitations * under the License. */ +/* eslint-disable no-console */ const path = require("path"); const fs = require("fs-extra"); @@ -25,6 +26,7 @@ const apps = [ "authentication-portal", "recovery-portal", "x509-certificate-aut async function deleteExistingThemesFolder() { for (const app of apps) { const themePath = path.join(__dirname, "apps", app, "src", "main", "webapp", "libs", "themes"); + if (fs.existsSync(themePath)) { console.log(`Deleting existing themes folder in ${app} app...`); await fs.remove(themePath); From 6e4237fadee1774eb975c23f064227e896608ed8 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Fri, 16 Aug 2024 15:53:34 +0530 Subject: [PATCH 08/13] Update PR builder --- .github/workflows/pr-builder.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index a619e1c4cae..d4f3e91731e 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -237,15 +237,17 @@ jobs: pnpm-version: [ 8.7.4 ] steps: - name: ⬇️ Checkout - id: checkout + id: checkout-master uses: actions/checkout@v2.3.3 with: fetch-depth: 1 + ref: master - - name: ⬇️ Fetch the latest commit from master branch - run: | - git fetch origin master:refs/remotes/origin/master - git fetch origin master --depth=1 + - name: ⬇️ Checkout + id: checkout + uses: actions/checkout@v2.3.3 + with: + fetch-depth: 1 - name: 🟢 Setup node id: setup-node From 99f0d917839823c52aaff44dcf40de1d3af70454 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Fri, 16 Aug 2024 16:13:55 +0530 Subject: [PATCH 09/13] Update pr-builder workflow --- .github/workflows/pr-builder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index d4f3e91731e..a1c246d9de2 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -301,7 +301,7 @@ jobs: - name: 👷 PNPM Build id: build-with-pnpm - run: pnpm nx affected --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }} --target=build --parallel=3 + run: pnpm nx affected --base=origin/master --head=${{ env.NX_HEAD }} --target=build --parallel=3 - name: 💾 Cache local Maven repository id: cache-maven-m2 From 481096a79b2d6a1ac739bf6d232a67bd8f367e81 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Fri, 16 Aug 2024 16:34:31 +0530 Subject: [PATCH 10/13] Update PR-builder --- .github/workflows/pr-builder.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index a1c246d9de2..8b7bb2b44bf 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -236,12 +236,12 @@ jobs: java-version: [ 11 ] pnpm-version: [ 8.7.4 ] steps: - - name: ⬇️ Checkout - id: checkout-master - uses: actions/checkout@v2.3.3 - with: - fetch-depth: 1 - ref: master + # - name: ⬇️ Checkout + # id: checkout-master + # uses: actions/checkout@v2.3.3 + # with: + # fetch-depth: 1 + # ref: master - name: ⬇️ Checkout id: checkout From aa9e0f2c1fb4d7cbffb134eb26affd69a0eb6768 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Fri, 16 Aug 2024 19:34:26 +0530 Subject: [PATCH 11/13] Update PR builder --- .github/workflows/pr-builder.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index 8b7bb2b44bf..a1c246d9de2 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -236,12 +236,12 @@ jobs: java-version: [ 11 ] pnpm-version: [ 8.7.4 ] steps: - # - name: ⬇️ Checkout - # id: checkout-master - # uses: actions/checkout@v2.3.3 - # with: - # fetch-depth: 1 - # ref: master + - name: ⬇️ Checkout + id: checkout-master + uses: actions/checkout@v2.3.3 + with: + fetch-depth: 1 + ref: master - name: ⬇️ Checkout id: checkout From c924c0b83938823e40453724bb226734e0d8d238 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Wed, 4 Sep 2024 10:53:10 +0530 Subject: [PATCH 12/13] Update PR builder --- .github/workflows/pr-builder.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index a1c246d9de2..ca18f42de70 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -21,7 +21,8 @@ env: jobs: lint: name: ⬣ ESLint (STATIC ANALYSIS) - if: ${{ github.event_name == 'pull_request' || github.event.label.name == 'trigger-pr-builder' }} + # if: ${{ github.event_name == 'pull_request' || github.event.label.name == 'trigger-pr-builder' }} + if: ${{ false }} runs-on: ubuntu-latest strategy: matrix: @@ -84,7 +85,8 @@ jobs: typecheck: name: ʦ Typecheck (STATIC ANALYSIS) - if: ${{ github.event.label.name == 'trigger-pr-builder' || github.event_name == 'pull_request'}} + # if: ${{ github.event.label.name == 'trigger-pr-builder' || github.event_name == 'pull_request'}} + if: ${{ false }} runs-on: ubuntu-latest strategy: matrix: @@ -142,6 +144,7 @@ jobs: test: name: 👾 Unit Test (TESTING) + if: ${{ false }} needs: [ typecheck ] runs-on: ubuntu-latest strategy: @@ -227,7 +230,6 @@ jobs: build: name: 🚧 Build - needs: [ test, typecheck ] runs-on: ubuntu-latest strategy: matrix: @@ -238,14 +240,7 @@ jobs: steps: - name: ⬇️ Checkout id: checkout-master - uses: actions/checkout@v2.3.3 - with: - fetch-depth: 1 - ref: master - - - name: ⬇️ Checkout - id: checkout - uses: actions/checkout@v2.3.3 + uses: actions/checkout@v4 with: fetch-depth: 1 From 5d218c9ed19530f5bff804c23eea9bf23927086e Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Wed, 4 Sep 2024 10:59:00 +0530 Subject: [PATCH 13/13] Update PR builder --- .github/workflows/pr-builder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index ca18f42de70..120ec2cbe32 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -242,7 +242,7 @@ jobs: id: checkout-master uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 0 - name: 🟢 Setup node id: setup-node