Skip to content

Commit d04c4a1

Browse files
authored
ci: Add failure notifications to workflows (#915)
* 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
1 parent 699f99f commit d04c4a1

27 files changed

+1223
-1
lines changed

.github/workflows/build_airflow.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,49 @@ jobs:
114114
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
115115
image-repository: sdp/${{ env.PRODUCT_NAME }}
116116
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
117+
118+
notify:
119+
name: Failure Notification
120+
needs: [generate_matrix, build, publish_manifests]
121+
runs-on: ubuntu-latest
122+
if: failure()
123+
steps:
124+
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
125+
with:
126+
channel-id: "C07UG6JH44F" # notifications-container-images
127+
payload: |
128+
{
129+
"text": "*${{ github.workflow }}* failed",
130+
"attachments": [
131+
{
132+
"pretext": "See the details below for a summary of which job(s) failed.",
133+
"color": "#aa0000",
134+
"fields": [
135+
{
136+
"title": "Generate Version List",
137+
"short": true,
138+
"value": "${{ needs.generate_matrix.result }}"
139+
},
140+
{
141+
"title": "Build/Publish Image",
142+
"short": true,
143+
"value": "${{ needs.build.result }}"
144+
},
145+
{
146+
"title": "Build/Publish Manifests",
147+
"short": true,
148+
"value": "${{ needs.publish_manifests.result }}"
149+
}
150+
],
151+
"actions": [
152+
{
153+
"type": "button",
154+
"text": "Go to workflow run",
155+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
156+
}
157+
]
158+
}
159+
]
160+
}
161+
env:
162+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}

.github/workflows/build_druid.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,49 @@ jobs:
116116
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
117117
image-repository: sdp/${{ env.PRODUCT_NAME }}
118118
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
119+
120+
notify:
121+
name: Failure Notification
122+
needs: [generate_matrix, build, publish_manifests]
123+
runs-on: ubuntu-latest
124+
if: failure()
125+
steps:
126+
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
127+
with:
128+
channel-id: "C07UG6JH44F" # notifications-container-images
129+
payload: |
130+
{
131+
"text": "*${{ github.workflow }}* failed",
132+
"attachments": [
133+
{
134+
"pretext": "See the details below for a summary of which job(s) failed.",
135+
"color": "#aa0000",
136+
"fields": [
137+
{
138+
"title": "Generate Version List",
139+
"short": true,
140+
"value": "${{ needs.generate_matrix.result }}"
141+
},
142+
{
143+
"title": "Build/Publish Image",
144+
"short": true,
145+
"value": "${{ needs.build.result }}"
146+
},
147+
{
148+
"title": "Build/Publish Manifests",
149+
"short": true,
150+
"value": "${{ needs.publish_manifests.result }}"
151+
}
152+
],
153+
"actions": [
154+
{
155+
"type": "button",
156+
"text": "Go to workflow run",
157+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
158+
}
159+
]
160+
}
161+
]
162+
}
163+
env:
164+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}

.github/workflows/build_hadoop.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,49 @@ jobs:
116116
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
117117
image-repository: sdp/${{ env.PRODUCT_NAME }}
118118
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
119+
120+
notify:
121+
name: Failure Notification
122+
needs: [generate_matrix, build, publish_manifests]
123+
runs-on: ubuntu-latest
124+
if: failure()
125+
steps:
126+
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
127+
with:
128+
channel-id: "C07UG6JH44F" # notifications-container-images
129+
payload: |
130+
{
131+
"text": "*${{ github.workflow }}* failed",
132+
"attachments": [
133+
{
134+
"pretext": "See the details below for a summary of which job(s) failed.",
135+
"color": "#aa0000",
136+
"fields": [
137+
{
138+
"title": "Generate Version List",
139+
"short": true,
140+
"value": "${{ needs.generate_matrix.result }}"
141+
},
142+
{
143+
"title": "Build/Publish Image",
144+
"short": true,
145+
"value": "${{ needs.build.result }}"
146+
},
147+
{
148+
"title": "Build/Publish Manifests",
149+
"short": true,
150+
"value": "${{ needs.publish_manifests.result }}"
151+
}
152+
],
153+
"actions": [
154+
{
155+
"type": "button",
156+
"text": "Go to workflow run",
157+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
158+
}
159+
]
160+
}
161+
]
162+
}
163+
env:
164+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}

.github/workflows/build_hbase.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,49 @@ jobs:
117117
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
118118
image-repository: sdp/${{ env.PRODUCT_NAME }}
119119
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
120+
121+
notify:
122+
name: Failure Notification
123+
needs: [generate_matrix, build, publish_manifests]
124+
runs-on: ubuntu-latest
125+
if: failure()
126+
steps:
127+
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
128+
with:
129+
channel-id: "C07UG6JH44F" # notifications-container-images
130+
payload: |
131+
{
132+
"text": "*${{ github.workflow }}* failed",
133+
"attachments": [
134+
{
135+
"pretext": "See the details below for a summary of which job(s) failed.",
136+
"color": "#aa0000",
137+
"fields": [
138+
{
139+
"title": "Generate Version List",
140+
"short": true,
141+
"value": "${{ needs.generate_matrix.result }}"
142+
},
143+
{
144+
"title": "Build/Publish Image",
145+
"short": true,
146+
"value": "${{ needs.build.result }}"
147+
},
148+
{
149+
"title": "Build/Publish Manifests",
150+
"short": true,
151+
"value": "${{ needs.publish_manifests.result }}"
152+
}
153+
],
154+
"actions": [
155+
{
156+
"type": "button",
157+
"text": "Go to workflow run",
158+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
159+
}
160+
]
161+
}
162+
]
163+
}
164+
env:
165+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}

.github/workflows/build_hello-world.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,49 @@ jobs:
112112
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
113113
image-repository: sdp/${{ env.PRODUCT_NAME }}
114114
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
115+
116+
notify:
117+
name: Failure Notification
118+
needs: [generate_matrix, build, publish_manifests]
119+
runs-on: ubuntu-latest
120+
if: failure()
121+
steps:
122+
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
123+
with:
124+
channel-id: "C07UG6JH44F" # notifications-container-images
125+
payload: |
126+
{
127+
"text": "*${{ github.workflow }}* failed",
128+
"attachments": [
129+
{
130+
"pretext": "See the details below for a summary of which job(s) failed.",
131+
"color": "#aa0000",
132+
"fields": [
133+
{
134+
"title": "Generate Version List",
135+
"short": true,
136+
"value": "${{ needs.generate_matrix.result }}"
137+
},
138+
{
139+
"title": "Build/Publish Image",
140+
"short": true,
141+
"value": "${{ needs.build.result }}"
142+
},
143+
{
144+
"title": "Build/Publish Manifests",
145+
"short": true,
146+
"value": "${{ needs.publish_manifests.result }}"
147+
}
148+
],
149+
"actions": [
150+
{
151+
"type": "button",
152+
"text": "Go to workflow run",
153+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
154+
}
155+
]
156+
}
157+
]
158+
}
159+
env:
160+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}

.github/workflows/build_hive.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,49 @@ jobs:
117117
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
118118
image-repository: sdp/${{ env.PRODUCT_NAME }}
119119
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
120+
121+
notify:
122+
name: Failure Notification
123+
needs: [generate_matrix, build, publish_manifests]
124+
runs-on: ubuntu-latest
125+
if: failure()
126+
steps:
127+
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
128+
with:
129+
channel-id: "C07UG6JH44F" # notifications-container-images
130+
payload: |
131+
{
132+
"text": "*${{ github.workflow }}* failed",
133+
"attachments": [
134+
{
135+
"pretext": "See the details below for a summary of which job(s) failed.",
136+
"color": "#aa0000",
137+
"fields": [
138+
{
139+
"title": "Generate Version List",
140+
"short": true,
141+
"value": "${{ needs.generate_matrix.result }}"
142+
},
143+
{
144+
"title": "Build/Publish Image",
145+
"short": true,
146+
"value": "${{ needs.build.result }}"
147+
},
148+
{
149+
"title": "Build/Publish Manifests",
150+
"short": true,
151+
"value": "${{ needs.publish_manifests.result }}"
152+
}
153+
],
154+
"actions": [
155+
{
156+
"type": "button",
157+
"text": "Go to workflow run",
158+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
159+
}
160+
]
161+
}
162+
]
163+
}
164+
env:
165+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}

.github/workflows/build_java-base.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,49 @@ jobs:
112112
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
113113
image-repository: sdp/${{ env.PRODUCT_NAME }}
114114
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
115+
116+
notify:
117+
name: Failure Notification
118+
needs: [generate_matrix, build, publish_manifests]
119+
runs-on: ubuntu-latest
120+
if: failure()
121+
steps:
122+
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
123+
with:
124+
channel-id: "C07UG6JH44F" # notifications-container-images
125+
payload: |
126+
{
127+
"text": "*${{ github.workflow }}* failed",
128+
"attachments": [
129+
{
130+
"pretext": "See the details below for a summary of which job(s) failed.",
131+
"color": "#aa0000",
132+
"fields": [
133+
{
134+
"title": "Generate Version List",
135+
"short": true,
136+
"value": "${{ needs.generate_matrix.result }}"
137+
},
138+
{
139+
"title": "Build/Publish Image",
140+
"short": true,
141+
"value": "${{ needs.build.result }}"
142+
},
143+
{
144+
"title": "Build/Publish Manifests",
145+
"short": true,
146+
"value": "${{ needs.publish_manifests.result }}"
147+
}
148+
],
149+
"actions": [
150+
{
151+
"type": "button",
152+
"text": "Go to workflow run",
153+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
154+
}
155+
]
156+
}
157+
]
158+
}
159+
env:
160+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}

.github/workflows/build_java-devel.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,49 @@ jobs:
112112
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
113113
image-repository: sdp/${{ env.PRODUCT_NAME }}
114114
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
115+
116+
notify:
117+
name: Failure Notification
118+
needs: [generate_matrix, build, publish_manifests]
119+
runs-on: ubuntu-latest
120+
if: failure()
121+
steps:
122+
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
123+
with:
124+
channel-id: "C07UG6JH44F" # notifications-container-images
125+
payload: |
126+
{
127+
"text": "*${{ github.workflow }}* failed",
128+
"attachments": [
129+
{
130+
"pretext": "See the details below for a summary of which job(s) failed.",
131+
"color": "#aa0000",
132+
"fields": [
133+
{
134+
"title": "Generate Version List",
135+
"short": true,
136+
"value": "${{ needs.generate_matrix.result }}"
137+
},
138+
{
139+
"title": "Build/Publish Image",
140+
"short": true,
141+
"value": "${{ needs.build.result }}"
142+
},
143+
{
144+
"title": "Build/Publish Manifests",
145+
"short": true,
146+
"value": "${{ needs.publish_manifests.result }}"
147+
}
148+
],
149+
"actions": [
150+
{
151+
"type": "button",
152+
"text": "Go to workflow run",
153+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
154+
}
155+
]
156+
}
157+
]
158+
}
159+
env:
160+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}

0 commit comments

Comments
 (0)