From 36a16d6491db6e9515529f5e8b3b84cee3ddb9d6 Mon Sep 17 00:00:00 2001 From: denisonbarbosa Date: Tue, 1 Aug 2023 09:18:37 -0400 Subject: [PATCH 1/2] Add job to open issue on build failure ADMX/L build failures sometimes are hard to spot, so opening an issue and syncing it to Jira will help us check for those failures. --- .github/workflows/adm-builds.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/adm-builds.yaml b/.github/workflows/adm-builds.yaml index 990a29275..b7bcac174 100644 --- a/.github/workflows/adm-builds.yaml +++ b/.github/workflows/adm-builds.yaml @@ -196,3 +196,20 @@ jobs: branch: auto-update-policydefinitions-${{ steps.get-branch-name.outputs.branch }} token: ${{ secrets.GITHUB_TOKEN }} delete-branch: true + + open-issue-on-fail: + name: Open issue on failure + runs-on: ubuntu-latest + needs: integrate-ad + if: ${{ failure() }} + steps: + - uses: actions/checkout@v3 + - name: Create issue if build failed + uses: JasonEtco/create-an-issue@v2 + env: + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + filename: .github/workflows/adm-builds-fail.md + search_existing: open + update_existing: true From c4e1de3b7297f4ea22ed5adbcce0e525985ab9c1 Mon Sep 17 00:00:00 2001 From: denisonbarbosa Date: Tue, 1 Aug 2023 09:18:23 -0400 Subject: [PATCH 2/2] Custom template for build failure This defines a custom template that will be used to create the issue when the build fails. --- .github/workflows/adm-builds-fail.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/workflows/adm-builds-fail.md diff --git a/.github/workflows/adm-builds-fail.md b/.github/workflows/adm-builds-fail.md new file mode 100644 index 000000000..c47312142 --- /dev/null +++ b/.github/workflows/adm-builds-fail.md @@ -0,0 +1,5 @@ +--- +title: ADMX/L build failed +labels: bug, jira +--- +Failed to build ADMX/L files for adsys. Please take a look at the run output in {{ env.RUN_URL }}.