Skip to content

Commit

Permalink
ci: Add failure notifications to workflows (#915)
Browse files Browse the repository at this point in the history
* ci: add failure slack notifications to ubi rust builder workflow

* ci: add failure slack notifications to build workflows

* ci: add failure slack notifications to mirror workflow

* ci: add failure slack notifications to preflight workflow
  • Loading branch information
NickLarsenNZ authored Nov 7, 2024
1 parent 699f99f commit d04c4a1
Show file tree
Hide file tree
Showing 27 changed files with 1,223 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/build_airflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,49 @@ jobs:
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
image-repository: sdp/${{ env.PRODUCT_NAME }}
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev

notify:
name: Failure Notification
needs: [generate_matrix, build, publish_manifests]
runs-on: ubuntu-latest
if: failure()
steps:
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
channel-id: "C07UG6JH44F" # notifications-container-images
payload: |
{
"text": "*${{ github.workflow }}* failed",
"attachments": [
{
"pretext": "See the details below for a summary of which job(s) failed.",
"color": "#aa0000",
"fields": [
{
"title": "Generate Version List",
"short": true,
"value": "${{ needs.generate_matrix.result }}"
},
{
"title": "Build/Publish Image",
"short": true,
"value": "${{ needs.build.result }}"
},
{
"title": "Build/Publish Manifests",
"short": true,
"value": "${{ needs.publish_manifests.result }}"
}
],
"actions": [
{
"type": "button",
"text": "Go to workflow run",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/build_druid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,49 @@ jobs:
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
image-repository: sdp/${{ env.PRODUCT_NAME }}
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev

notify:
name: Failure Notification
needs: [generate_matrix, build, publish_manifests]
runs-on: ubuntu-latest
if: failure()
steps:
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
channel-id: "C07UG6JH44F" # notifications-container-images
payload: |
{
"text": "*${{ github.workflow }}* failed",
"attachments": [
{
"pretext": "See the details below for a summary of which job(s) failed.",
"color": "#aa0000",
"fields": [
{
"title": "Generate Version List",
"short": true,
"value": "${{ needs.generate_matrix.result }}"
},
{
"title": "Build/Publish Image",
"short": true,
"value": "${{ needs.build.result }}"
},
{
"title": "Build/Publish Manifests",
"short": true,
"value": "${{ needs.publish_manifests.result }}"
}
],
"actions": [
{
"type": "button",
"text": "Go to workflow run",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/build_hadoop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,49 @@ jobs:
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
image-repository: sdp/${{ env.PRODUCT_NAME }}
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev

notify:
name: Failure Notification
needs: [generate_matrix, build, publish_manifests]
runs-on: ubuntu-latest
if: failure()
steps:
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
channel-id: "C07UG6JH44F" # notifications-container-images
payload: |
{
"text": "*${{ github.workflow }}* failed",
"attachments": [
{
"pretext": "See the details below for a summary of which job(s) failed.",
"color": "#aa0000",
"fields": [
{
"title": "Generate Version List",
"short": true,
"value": "${{ needs.generate_matrix.result }}"
},
{
"title": "Build/Publish Image",
"short": true,
"value": "${{ needs.build.result }}"
},
{
"title": "Build/Publish Manifests",
"short": true,
"value": "${{ needs.publish_manifests.result }}"
}
],
"actions": [
{
"type": "button",
"text": "Go to workflow run",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/build_hbase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,49 @@ jobs:
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
image-repository: sdp/${{ env.PRODUCT_NAME }}
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev

notify:
name: Failure Notification
needs: [generate_matrix, build, publish_manifests]
runs-on: ubuntu-latest
if: failure()
steps:
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
channel-id: "C07UG6JH44F" # notifications-container-images
payload: |
{
"text": "*${{ github.workflow }}* failed",
"attachments": [
{
"pretext": "See the details below for a summary of which job(s) failed.",
"color": "#aa0000",
"fields": [
{
"title": "Generate Version List",
"short": true,
"value": "${{ needs.generate_matrix.result }}"
},
{
"title": "Build/Publish Image",
"short": true,
"value": "${{ needs.build.result }}"
},
{
"title": "Build/Publish Manifests",
"short": true,
"value": "${{ needs.publish_manifests.result }}"
}
],
"actions": [
{
"type": "button",
"text": "Go to workflow run",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/build_hello-world.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,49 @@ jobs:
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
image-repository: sdp/${{ env.PRODUCT_NAME }}
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev

notify:
name: Failure Notification
needs: [generate_matrix, build, publish_manifests]
runs-on: ubuntu-latest
if: failure()
steps:
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
channel-id: "C07UG6JH44F" # notifications-container-images
payload: |
{
"text": "*${{ github.workflow }}* failed",
"attachments": [
{
"pretext": "See the details below for a summary of which job(s) failed.",
"color": "#aa0000",
"fields": [
{
"title": "Generate Version List",
"short": true,
"value": "${{ needs.generate_matrix.result }}"
},
{
"title": "Build/Publish Image",
"short": true,
"value": "${{ needs.build.result }}"
},
{
"title": "Build/Publish Manifests",
"short": true,
"value": "${{ needs.publish_manifests.result }}"
}
],
"actions": [
{
"type": "button",
"text": "Go to workflow run",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/build_hive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,49 @@ jobs:
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
image-repository: sdp/${{ env.PRODUCT_NAME }}
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev

notify:
name: Failure Notification
needs: [generate_matrix, build, publish_manifests]
runs-on: ubuntu-latest
if: failure()
steps:
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
channel-id: "C07UG6JH44F" # notifications-container-images
payload: |
{
"text": "*${{ github.workflow }}* failed",
"attachments": [
{
"pretext": "See the details below for a summary of which job(s) failed.",
"color": "#aa0000",
"fields": [
{
"title": "Generate Version List",
"short": true,
"value": "${{ needs.generate_matrix.result }}"
},
{
"title": "Build/Publish Image",
"short": true,
"value": "${{ needs.build.result }}"
},
{
"title": "Build/Publish Manifests",
"short": true,
"value": "${{ needs.publish_manifests.result }}"
}
],
"actions": [
{
"type": "button",
"text": "Go to workflow run",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/build_java-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,49 @@ jobs:
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
image-repository: sdp/${{ env.PRODUCT_NAME }}
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev

notify:
name: Failure Notification
needs: [generate_matrix, build, publish_manifests]
runs-on: ubuntu-latest
if: failure()
steps:
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
channel-id: "C07UG6JH44F" # notifications-container-images
payload: |
{
"text": "*${{ github.workflow }}* failed",
"attachments": [
{
"pretext": "See the details below for a summary of which job(s) failed.",
"color": "#aa0000",
"fields": [
{
"title": "Generate Version List",
"short": true,
"value": "${{ needs.generate_matrix.result }}"
},
{
"title": "Build/Publish Image",
"short": true,
"value": "${{ needs.build.result }}"
},
{
"title": "Build/Publish Manifests",
"short": true,
"value": "${{ needs.publish_manifests.result }}"
}
],
"actions": [
{
"type": "button",
"text": "Go to workflow run",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/build_java-devel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,49 @@ jobs:
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
image-repository: sdp/${{ env.PRODUCT_NAME }}
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev

notify:
name: Failure Notification
needs: [generate_matrix, build, publish_manifests]
runs-on: ubuntu-latest
if: failure()
steps:
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
channel-id: "C07UG6JH44F" # notifications-container-images
payload: |
{
"text": "*${{ github.workflow }}* failed",
"attachments": [
{
"pretext": "See the details below for a summary of which job(s) failed.",
"color": "#aa0000",
"fields": [
{
"title": "Generate Version List",
"short": true,
"value": "${{ needs.generate_matrix.result }}"
},
{
"title": "Build/Publish Image",
"short": true,
"value": "${{ needs.build.result }}"
},
{
"title": "Build/Publish Manifests",
"short": true,
"value": "${{ needs.publish_manifests.result }}"
}
],
"actions": [
{
"type": "button",
"text": "Go to workflow run",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
Loading

0 comments on commit d04c4a1

Please sign in to comment.