From df2f58c6c243c1c2e2ac4ce94fd785bd7584741e Mon Sep 17 00:00:00 2001 From: Ravi Pendurty Date: Mon, 1 Sep 2025 17:11:56 +0530 Subject: [PATCH] Include new jobs In gerrit merge flow Issue-ID: OAM-492 Change-Id: I4243d6f9e772127d5a3b44f03178e10c6f57dd66 Signed-off-by: Ravi Pendurty --- .../workflows/gerrit-merge-oam-oam-controller.yaml | 47 +++++++++++++++++++--- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gerrit-merge-oam-oam-controller.yaml b/.github/workflows/gerrit-merge-oam-oam-controller.yaml index 2e30c9e..aa397e2 100644 --- a/.github/workflows/gerrit-merge-oam-oam-controller.yaml +++ b/.github/workflows/gerrit-merge-oam-oam-controller.yaml @@ -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 -- 2.16.6