Fix gerrit-verify.yml 12/14712/4
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>
Fri, 11 Jul 2025 13:18:36 +0000 (18:48 +0530)
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>
Mon, 14 Jul 2025 13:41:52 +0000 (13:41 +0000)
Issue-ID: OAM-474
Change-Id: Ic44fa8f938b665f7d5efa5066186365e9076a54e
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
.github/workflows/gerrit-verify.yaml
README.md

index b67c8bc..d274017 100644 (file)
@@ -69,8 +69,19 @@ jobs:
       - name: Allow replication
         run: sleep 10s
 
+  sanitize:
+    runs-on: ubuntu-latest
+    outputs:
+      sanitized_project: ${{ steps.sanitize.outputs.result }}
+    steps:
+      - name: Sanitize GERRIT_PROJECT
+        id: sanitize
+        run: echo "result=${GERRIT_PROJECT//\//-}" >> $GITHUB_OUTPUT
+        env:
+          GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT }}
+
   maven-verify:
-    needs: prepare
+    needs: [prepare, sanitize]
     # use compose-jjb-verify from the v0.4 series of releng-reusable-workflows
     # yamllint disable-line rule:line-length
     uses: lfit/releng-reusable-workflows/.github/workflows/compose-maven-verify.yaml@main
@@ -82,7 +93,7 @@ jobs:
       GERRIT_EVENT_TYPE: ${{ inputs.GERRIT_EVENT_TYPE }}
       GERRIT_PATCHSET_NUMBER: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
       GERRIT_PATCHSET_REVISION: ${{ inputs.GERRIT_PATCHSET_REVISION }}
-      GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT }}
+      GERRIT_PROJECT: ${{ github.repository_owner }}/${{ needs.sanitize.outputs.sanitized_project }}
       GERRIT_REFSPEC: ${{ inputs.GERRIT_REFSPEC }}
       JDK_VERSION: "21"
       MVN_VERSION: "3.9.6"
index af1640d..116672a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -51,3 +51,4 @@ This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENS
 
 # Github Workflows
 - Github workflows will be used instead of Jenkins for CI/CD
+- 2 Github workflows are added for building the code