From 77f60da134e44ee538ebb439cdf09cfd552d7a5e Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Mon, 5 Aug 2024 18:33:04 +0530 Subject: [PATCH 1/7] Test Pr-builder improvement --- .../src/main/webapp/add-security-questions.jsp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/identity-apps-core/apps/authentication-portal/src/main/webapp/add-security-questions.jsp b/identity-apps-core/apps/authentication-portal/src/main/webapp/add-security-questions.jsp index 7697489b6aa..aabace422f6 100644 --- a/identity-apps-core/apps/authentication-portal/src/main/webapp/add-security-questions.jsp +++ b/identity-apps-core/apps/authentication-portal/src/main/webapp/add-security-questions.jsp @@ -17,6 +17,9 @@ --%> <%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %> + + + <%@ page import="org.owasp.encoder.Encode" %> <%@ page import="org.wso2.carbon.identity.application.authentication.endpoint.util.AuthenticationEndpointUtil" %> <%@ page import="org.wso2.carbon.identity.application.authentication.endpoint.util.EncodedControl" %> From 5ee16d5cb66b0fb23bc2448de219214b37dc15bb Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Mon, 5 Aug 2024 19:47:30 +0530 Subject: [PATCH 2/7] Improve PR builder workflow --- .github/workflows/pr-builder.yml | 12 ++++++------ identity-apps-core/package.json | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index f9b7834d332..627c0394241 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -286,13 +286,13 @@ jobs: - name: 👷 PNPM Build id: build-with-pnpm - run: pnpm build + run: pnpm nx affected: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 + # - 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 - name: 💾 Cache local Maven repository id: cache-maven-m2 diff --git a/identity-apps-core/package.json b/identity-apps-core/package.json index d162b94cf58..e035f01b2d3 100644 --- a/identity-apps-core/package.json +++ b/identity-apps-core/package.json @@ -6,7 +6,9 @@ "author": "WSO2", "license": "Apache-2.0", "scripts": { - "build": "pnpm nx run theme:build && node theme-distribute.js", + "build:base": "pnpm nx run theme:build && node theme-distribute.js", + "build": "pnpm build:base && pnpm build:maven", + "build:maven": "mvn clean install -U", "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", From 84828f8e97be0dbfc8a0e57ff89e21b1f41b5aef Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Mon, 5 Aug 2024 20:08:08 +0530 Subject: [PATCH 3/7] Improve PR builder --- .github/workflows/pr-builder.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index 627c0394241..477b99f5e8d 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -246,6 +246,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 From 51ce9d0c9e00190e9d0a35b98b89996ee4eec34a Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Mon, 5 Aug 2024 20:23:09 +0530 Subject: [PATCH 4/7] Improve 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 477b99f5e8d..5f42e9e6005 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -292,7 +292,7 @@ jobs: - name: 👷 PNPM Build id: build-with-pnpm - run: pnpm nx affected:build + run: pnpm nx affected --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }} --target=build --parallel=3 # - name: 🏗️ Maven Build identity-apps-core # id: build-with-maven From 52f52b03b50e00b331f2e89fdd6a6f0e81702940 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Mon, 5 Aug 2024 20:24:50 +0530 Subject: [PATCH 5/7] Skip tests step temporarily --- .github/workflows/pr-builder.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index 5f42e9e6005..0577edfecb8 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -142,6 +142,7 @@ jobs: test: name: 👾 Unit Test (TESTING) + if: ${{ false }} needs: [ typecheck ] runs-on: ubuntu-latest strategy: @@ -227,7 +228,7 @@ jobs: build: name: 🚧 Build - needs: [ test, typecheck ] + needs: [ typecheck ] runs-on: ubuntu-latest strategy: matrix: From 54171c4ed3a2a3953b32217cc3cee6d6e271bb5a Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Mon, 5 Aug 2024 20:35:28 +0530 Subject: [PATCH 6/7] Add checkout depth --- .github/workflows/pr-builder.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index 0577edfecb8..18796664215 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -240,6 +240,8 @@ jobs: - name: ⬇️ Checkout id: checkout uses: actions/checkout@v2.3.3 + with: + fetch-depth: 0 - name: 🟢 Setup node id: setup-node From b0d51aca24dac9e158e8bcd8e01238423a8cf8da Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Tue, 6 Aug 2024 10:38:35 +0530 Subject: [PATCH 7/7] Improve identity-apps-core build --- identity-apps-core/package.json | 6 ++-- identity-apps-core/pom.xml | 62 --------------------------------- 2 files changed, 3 insertions(+), 65 deletions(-) diff --git a/identity-apps-core/package.json b/identity-apps-core/package.json index e035f01b2d3..1f3f8b5e421 100644 --- a/identity-apps-core/package.json +++ b/identity-apps-core/package.json @@ -6,9 +6,9 @@ "author": "WSO2", "license": "Apache-2.0", "scripts": { - "build:base": "pnpm nx run theme:build && node theme-distribute.js", - "build": "pnpm build:base && pnpm build:maven", - "build:maven": "mvn clean install -U", + "build:theme-module": "pnpm nx run theme:build && node theme-distribute.js", + "build": "pnpm build:theme-module && pnpm build:maven", + "build:maven": "mvn clean install", "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", diff --git a/identity-apps-core/pom.xml b/identity-apps-core/pom.xml index 7c88c3828a3..1f8232c1a43 100644 --- a/identity-apps-core/pom.xml +++ b/identity-apps-core/pom.xml @@ -581,68 +581,6 @@ - - - org.codehaus.mojo - 1.6.0 - exec-maven-plugin - false - - - npm install (initialize) - - exec - - initialize - - pnpm - - install - - ${bootstrap.exec.skip} - ${basedir} - - - - run-linter - - exec - - process-resources - - pnpm - - lint - - ${lint.exec.skip} - ${basedir} - - - - npm run build (compile) - - exec - - compile - - pnpm - - build - - ${basedir} - - - - - - - ${basedir}/npm - ${NPM_CONFIG_PREFIX}/cache - ${project.build.directory}/npmtmp - - - - org.apache.maven.plugins