From 5accc60774df763a78607e0cc6aaa6fe07183ee4 Mon Sep 17 00:00:00 2001 From: Ivanmeneges Date: Fri, 12 Sep 2025 13:01:11 +0530 Subject: [PATCH 01/10] [MOSIP-42820] Updated build.gradle Signed-off-by: Ivanmeneges --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 5e1ffbad1..83e8a63b7 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -58,7 +58,7 @@ ext { clientmanagerLibVersionCode = 1 clientmanagerLibVersionName = "\"1.0.0\"" - serverBaseURL = "\"https://api-internal.qa-base.mosip.net\"" + serverBaseURL = "\"https://api-internal.sandbox.xyz.net/"" serverHealthCheckPath = "\"/v1/syncdata/actuator/health\"" serverActuatorInfoPath = "\"/v1/syncdata/actuator/info\"" debugPassword = "\"APTyKejHxACQyKBSRciR\"" From 315733aa0a4708ea0501d9148f3b088524f46858 Mon Sep 17 00:00:00 2001 From: Ivanmeneges Date: Fri, 12 Sep 2025 13:04:19 +0530 Subject: [PATCH 02/10] [MOSIP-42820] Update build.gradle Signed-off-by: Ivanmeneges --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 83e8a63b7..0630fb419 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -58,7 +58,7 @@ ext { clientmanagerLibVersionCode = 1 clientmanagerLibVersionName = "\"1.0.0\"" - serverBaseURL = "\"https://api-internal.sandbox.xyz.net/"" + serverBaseURL = "\"https://api-internal.sandbox.xyz.net\"" serverHealthCheckPath = "\"/v1/syncdata/actuator/health\"" serverActuatorInfoPath = "\"/v1/syncdata/actuator/info\"" debugPassword = "\"APTyKejHxACQyKBSRciR\"" From de06846fdf64c75898d76047de3c5a10b3ea6d50 Mon Sep 17 00:00:00 2001 From: Ivanmeneges Date: Tue, 16 Sep 2025 11:13:52 +0530 Subject: [PATCH 03/10] [MOSIP-42820] Updated pull request build-android.yml Signed-off-by: Ivanmeneges --- .github/workflows/build-android.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 1f32fe110..5197ee35f 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -1,6 +1,8 @@ name: Build Android Registration-Client on: + pull_request: + types: [opened, reopened, synchronize] workflow_dispatch: push: branches: From 3cbfb83e16c067e2b5d9f0ad2e86ac6399734285 Mon Sep 17 00:00:00 2001 From: Ivanmeneges Date: Tue, 16 Sep 2025 12:16:50 +0530 Subject: [PATCH 04/10] [MOSIP-42820] Updated server base build-android.yml Signed-off-by: Ivanmeneges --- .github/workflows/build-android.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 5197ee35f..99afc6d77 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -1,14 +1,19 @@ name: Build Android Registration-Client on: + workflow_dispatch: + inputs: + defaultServerBaseURL: + description: 'Server Base URL' + required: true + default: 'api-internal.sandbox.xyz.net' + type: string pull_request: types: [opened, reopened, synchronize] - workflow_dispatch: push: branches: - release* - develop - jobs: build: runs-on: ubuntu-latest From a0c8e0da4b109e0876492a4da77e5082197ee4b2 Mon Sep 17 00:00:00 2001 From: Ivanmeneges Date: Mon, 29 Sep 2025 10:11:30 +0530 Subject: [PATCH 05/10] Updated serverbase url and checks Signed-off-by: Ivanmeneges --- .github/workflows/push_trigger.yml | 81 ++++++++++++++++++++++++------ 1 file changed, 66 insertions(+), 15 deletions(-) diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml index 4b5569f8b..24eb69b83 100644 --- a/.github/workflows/push_trigger.yml +++ b/.github/workflows/push_trigger.yml @@ -1,7 +1,13 @@ name: Android Registration-Client Build - on: + workflow_dispatch: + inputs: + serverBaseURL: + description: "Enter the Server Base URL (e.g. api-internal.qacore.mosip.net)" + required: true + default: "api-internal.qacore.mosip.net" + push: branches: - '!release-branch' @@ -13,16 +19,54 @@ on: - main jobs: + + dco: + name: DCO Check + uses: docker://docker://ghcr.io/apps/dco:latest + permissions: + contents: read + pull-requests: write + + codeql: + name: CodeQL Analysis + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [ 'java', 'javascript' ] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + build-android: + name: Android Registration-Client Build + needs: [dco, codeql] runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v3 + - name: Install npm dependencies run: | npm install - - name: Updating serverBaseURL. + + - name: Update serverBaseURL run: | - find . -type f -name "*build.gradle" -print0 | xargs -0 sed -i "s/api-internal.sandbox.xyz.net/${{ github.event.inputs.defaultServerBaseURL }}/g" + find . -type f -name "*build.gradle" -print0 | xargs -0 sed -i "s/api-internal.sandbox.xyz.net/${{ github.event.inputs.serverBaseURL }}/g" + - name: Build Android Registration-Client run: | cd client @@ -30,42 +74,49 @@ jobs: ./gradlew assembleDebug ls app/build/outputs/apk/debug find -name '*.apk' - - name: Upload Artifact + + - name: Upload APK Artifact uses: actions/upload-artifact@v4 with: name: apk-output path: ./client/app/build/outputs/apk/debug/app-debug.apk retention-days: 5 - build: - name: sonar-analysis + sonar-analysis: + name: SonarQube Analysis + needs: [build-android] runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v3 with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + fetch-depth: 0 + - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: - java-version: 11 + java-version: '11' + - name: Cache SonarCloud packages uses: actions/cache@v4 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar + - name: Cache Gradle packages uses: actions/cache@v4 with: path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: ${{ runner.os }}-gradle - - name: Build and analyze + + - name: Build and Sonar Analysis env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | cd client chmod +x gradlew ./gradlew build test testDebugUnitTestCoverage sonarqube --info --warning-mode all - ./gradlew build sonarqube --info --warning-mode all From 1b9856f01e7239569550e1de18e240e11f59e385 Mon Sep 17 00:00:00 2001 From: Ivanmeneges Date: Tue, 30 Sep 2025 16:25:52 +0530 Subject: [PATCH 06/10] [DSD-42820] Server base URL updated with pre checks in push_trigger.yml Signed-off-by: Ivanmeneges --- .github/workflows/push_trigger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml index 24eb69b83..f1e085340 100644 --- a/.github/workflows/push_trigger.yml +++ b/.github/workflows/push_trigger.yml @@ -22,7 +22,7 @@ jobs: dco: name: DCO Check - uses: docker://docker://ghcr.io/apps/dco:latest + uses: docker://ghcr.io/apps/dco:latest permissions: contents: read pull-requests: write From 0615a63dc33dbfb55c3878ce6b9039914e200725 Mon Sep 17 00:00:00 2001 From: Ivanmeneges Date: Mon, 13 Oct 2025 10:37:03 +0530 Subject: [PATCH 07/10] [MOS-9645] Updated DCO checks in push_trigger.yml Signed-off-by: Ivanmeneges --- .github/workflows/push_trigger.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml index f1e085340..60da22d27 100644 --- a/.github/workflows/push_trigger.yml +++ b/.github/workflows/push_trigger.yml @@ -20,12 +20,17 @@ on: jobs: - dco: + dco: name: DCO Check - uses: docker://ghcr.io/apps/dco:latest + runs-on: ubuntu-latest permissions: contents: read pull-requests: write + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: DCO Check + uses: DCOapp/action@v1.3.5 codeql: name: CodeQL Analysis From cf405e1b4ed60656de0fb4c7415ace11814989cd Mon Sep 17 00:00:00 2001 From: Ivanmeneges Date: Mon, 13 Oct 2025 10:43:42 +0530 Subject: [PATCH 08/10] [MOSIP-42820] Updated properties for checks Signed-off-by: Ivanmeneges --- .github/workflows/push_trigger.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml index 60da22d27..8b5c1c418 100644 --- a/.github/workflows/push_trigger.yml +++ b/.github/workflows/push_trigger.yml @@ -20,7 +20,7 @@ on: jobs: - dco: + dco: name: DCO Check runs-on: ubuntu-latest permissions: @@ -59,19 +59,15 @@ jobs: name: Android Registration-Client Build needs: [dco, codeql] runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v3 - - name: Install npm dependencies run: | npm install - - name: Update serverBaseURL run: | find . -type f -name "*build.gradle" -print0 | xargs -0 sed -i "s/api-internal.sandbox.xyz.net/${{ github.event.inputs.serverBaseURL }}/g" - - name: Build Android Registration-Client run: | cd client @@ -79,7 +75,6 @@ jobs: ./gradlew assembleDebug ls app/build/outputs/apk/debug find -name '*.apk' - - name: Upload APK Artifact uses: actions/upload-artifact@v4 with: @@ -91,7 +86,6 @@ jobs: name: SonarQube Analysis needs: [build-android] runs-on: ubuntu-latest - steps: - name: Checkout repository uses: actions/checkout@v3 From ee10a3aa792da1d65a225ecc3d0ff733a6d1adda Mon Sep 17 00:00:00 2001 From: Ivanmeneges Date: Mon, 24 Nov 2025 14:33:19 +0530 Subject: [PATCH 09/10] [MOSIP-42820] Enabled pre checks in push_trigger.yml Signed-off-by: Ivanmeneges --- .github/workflows/push_trigger.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml index 8b5c1c418..65d053eb1 100644 --- a/.github/workflows/push_trigger.yml +++ b/.github/workflows/push_trigger.yml @@ -18,6 +18,15 @@ on: - sprint-* - main + pull_request: + branches: + - '!release-branch' + - release-* + - master + - develop + - sprint-* + - main + jobs: dco: From 2e1001b207b5f2627365add1a3800b43164e6ff7 Mon Sep 17 00:00:00 2001 From: Ivanmeneges Date: Mon, 24 Nov 2025 14:49:07 +0530 Subject: [PATCH 10/10] =?UTF-8?q?Updated=20=E2=80=9CserverBaseURL=E2=80=9D?= =?UTF-8?q?=20should=20be=20dynamic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ivanmeneges --- .github/workflows/build-android.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 99afc6d77..e6a96a931 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -4,23 +4,28 @@ on: workflow_dispatch: inputs: defaultServerBaseURL: - description: 'Server Base URL' + description: 'Enter serverBaseURL for APK' required: true - default: 'api-internal.sandbox.xyz.net' + default: "https://api.default.example.com" type: string pull_request: types: [opened, reopened, synchronize] push: branches: - - release* + - 'release*' - develop jobs: build: runs-on: ubuntu-latest - + env: + SERVER_BASE_URL: ${{ github.event.inputs.defaultServerBaseURL || 'https://api.default.example.com' }} steps: - name: Checkout code uses: actions/checkout@v2 + - name: Replace serverBaseURL + run: | + find android -type f -name "build.gradle*" -print0 \ + | xargs -0 sed -i "s#api-internal.sandbox.xyz.net#${SERVER_BASE_URL}#g" - name: Setup java 17 uses: actions/setup-java@v2 with: @@ -45,6 +50,9 @@ jobs: # - name: Flutter test # run: flutter test + - name: Make gradlew executable + run: chmod +x android/gradlew + - name: Decode android/app/arc-local-keystore.jks run: echo "${{ secrets.JKS_PRIVATE_SECRET }}" | base64 --decode > android/app/arc-local-keystore.jks