mumrah commented on code in PR #17195:
URL: https://github.com/apache/kafka/pull/17195#discussion_r1759592733


##########
.github/workflows/ci-complete.yml:
##########
@@ -78,26 +73,35 @@ jobs:
         uses: ./.github/actions/gh-api-update-status
         with:
           gh-token: ${{ secrets.GITHUB_TOKEN }}
+          repository: ${{ github.repository }}
           commit_sha: ${{ github.event.workflow_run.head_sha }}
           url: '${{ github.event.repository.html_url }}/actions/runs/${{ 
github.run_id }}'
           description: 'Could not find build scan'
           context: 'Gradle Build Scan / Java ${{ matrix.java }}'
           state: 'error'
       - name: Publish Scan
         id: publish-build-scan
-        continue-on-error: true
         if: ${{ steps.download-build-scan.outcome == 'success' }}
         run: |
+          set +e
           ./gradlew --info buildScanPublishPrevious > gradle.out
-          SCAN_URL=$(grep '^https://.*$' gradle.out)
-          cat gradle.out
-          echo "Published build scan to $SCAN_URL" >> $GITHUB_STEP_SUMMARY
-          echo "build-scan-url=$SCAN_URL" >> $GITHUB_OUTPUT
+          exitcode="$?"
+          if [ $exitcode -ne 0 ]; then
+            cat gradle.out
+            echo "Failed to publish build scan" >> $GITHUB_STEP_SUMMARY
+            exit $exitcode

Review Comment:
   This causes this step (and the overall workflow) to fail if we can't upload 
a build scan. This means we can browse through CI Complete runs on `trunk` in 
the UI and see which ones failed to upload. Then we can easily re-run those



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to