Include new jobs 64/14864/1
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>
Mon, 1 Sep 2025 11:41:56 +0000 (17:11 +0530)
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>
Mon, 1 Sep 2025 11:41:56 +0000 (17:11 +0530)
In gerrit merge flow

Issue-ID: OAM-492
Change-Id: I4243d6f9e772127d5a3b44f03178e10c6f57dd66
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
.github/workflows/gerrit-merge-oam-oam-controller.yaml

index 2e30c9e..aa397e2 100644 (file)
@@ -16,10 +16,10 @@ on:
       #   description: "The ID for the change"
       #   required: true
       #   type: string
-      GERRIT_CHANGE_NUMBER:
-        description: "The Gerrit number"
-        required: true
-        type: string
+      GERRIT_CHANGE_NUMBER:
+        description: "The Gerrit number"
+        required: true
+        type: string
       # GERRIT_CHANGE_URL:
       #   description: "URL to the change"
       #   required: true
@@ -51,7 +51,25 @@ concurrency:
   cancel-in-progress: true
 
 jobs:
+  notify:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Notify job start
+        # yamllint disable-line rule:line-length
+        uses: lfit/gerrit-review-action@9627b9a144f2a2cad70707ddfae87c87dce60729 # v0.8
+        with:
+          host: ${{ vars.GERRIT_SERVER }}
+          username: ${{ vars.GERRIT_SSH_USER }}
+          key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
+          known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
+          gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
+          gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
+          vote-type: clear
+      - name: Allow replication
+        run: sleep 10s
+
   sanitize:
+    needs: [notify]
     runs-on: ubuntu-latest
     outputs:
       sanitized_project: ${{ steps.sanitize.outputs.result }}
@@ -63,7 +81,7 @@ jobs:
           GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT }}
 
   maven-merge:
-    needs: [sanitize]
+    needs: [notify, sanitize]
     # use compose-jjb-verify from the v0.4 series of releng-reusable-workflows
     # yamllint disable-line rule:line-length
     uses: ravipendurty/releng-reusable-workflows/.github/workflows/compose-make-merge.yaml@main
@@ -84,4 +102,21 @@ jobs:
       # yamllint enable rule:line-length
       ENV_VARS: ${{ toJSON(vars) }}
 
-  
\ No newline at end of file
+  report-status:
+    if: ${{ always() }}
+    needs: [notify, sanitize, maven-merge]
+    runs-on: ubuntu-latest
+    steps:
+      - name: Get workflow conclusion
+        uses: technote-space/workflow-conclusion-action@v3
+      - name: Report workflow conclusion
+        # yamllint disable-line rule:line-length
+        uses: lfit/gerrit-review-action@9627b9a144f2a2cad70707ddfae87c87dce60729 # v0.8
+        with:
+          host: ${{ vars.GERRIT_SERVER }}
+          username: ${{ vars.GERRIT_SSH_USER }}
+          key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
+          known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
+          gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
+          gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
+          vote-type: ${{ env.WORKFLOW_CONCLUSION }}
\ No newline at end of file