Skip to content

Commit 2eadde5

Browse files
authored
feat(send-slack-notification): Add field for helm chart result in template (#90)
1 parent 71c8c7a commit 2eadde5

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

send-slack-notification/action.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ inputs:
1212
description: The result of the build job
1313
publish-manifests-result:
1414
description: The result of the publish manifests job
15+
publish-helm-chart-result:
16+
description: The result of the publish helm chart job (if any)
17+
default: "N/A"
1518
test-result:
1619
description: The result of an integration test
1720
test-health:
@@ -28,6 +31,7 @@ runs:
2831
NOTIFICATION_TYPE: ${{ inputs.type }}
2932

3033
PUBLISH_MANIFESTS_RESULT: ${{ inputs.publish-manifests-result }}
34+
PUBLISH_HELM_CHART_RESULT: ${{ inputs.publish-helm-chart-result }}
3135
BUILD_RESULT: ${{ inputs.build-result }}
3236

3337
FAILED_TESTS: ${{ inputs.failed-tests }}
@@ -45,6 +49,7 @@ runs:
4549
[ -z "${BUILD_RESULT:-}" ] && echo "The build-result input must be provided" && exit 1
4650
4751
echo "PUBLISH_MANIFESTS_RESULT=$PUBLISH_MANIFESTS_RESULT" | tee -a "$GITHUB_ENV"
52+
echo "PUBLISH_HELM_CHART_RESULT=$PUBLISH_HELM_CHART_RESULT" | tee -a "$GITHUB_ENV"
4853
echo "BUILD_RESULT=$BUILD_RESULT" | tee -a "$GITHUB_ENV"
4954
elif [ "$NOTIFICATION_TYPE" == "integration-test" ]; then
5055
[ -z "${TEST_RESULT:-}" ] && echo "The test-result input must be provided" && exit 1
@@ -89,7 +94,7 @@ runs:
8994
9095
if [ "$NOTIFICATION_TYPE" == "container-image-build" ]; then
9196
# TODO (@Techassi): Also add success template
92-
if [ "$PUBLISH_MANIFESTS_RESULT" = "failure" ] || [ "$BUILD_RESULT" = "failure" ]; then
97+
if [ "$PUBLISH_MANIFESTS_RESULT" = "failure" ] || [ "$PUBLISH_HELM_CHART_RESULT" = "failure" ] || [ "$BUILD_RESULT" = "failure" ]; then
9398
export MESSAGE_VERB=failed
9499
export MESSAGE_COLOR=aa0000
95100
else

send-slack-notification/templates/container-image-build/failure.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ attachments:
1111
- title: Build/Publish Manifests
1212
short: true
1313
value: "${PUBLISH_MANIFESTS_RESULT}"
14+
- title: Build/Publish Helm Chart
15+
short: true
16+
value: "${PUBLISH_HELM_CHART_RESULT}"
1417
actions:
1518
- type: button
1619
text: Go to workflow run

0 commit comments

Comments
 (0)