Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions send-slack-notification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
- `build-result` (optional, e.g. `success`)
- `publish-manifests-result` (optional, e.g. `failure`)
- `publish-helm-chart-result` (optional, e.g. `failure`)
- `combined-checks-result` (optional, e.g. `failure`)
- `test-result` (optional, e.g. `failure`)
- `test-health` (optional, comes from the `run-integration-test` action)
- `failed-tests` (optional, comes from the `run-integration-test` action)
Expand Down
9 changes: 8 additions & 1 deletion send-slack-notification/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ inputs:
publish-helm-chart-result:
description: The result of the publish helm chart job (if any)
default: "N/A"
combined-checks-result:
description: The result of one ore more checks combined (if any)
default: "N/A"
test-result:
description: The result of an integration test
test-health:
Expand All @@ -39,6 +42,7 @@ runs:

PUBLISH_MANIFESTS_RESULT: ${{ inputs.publish-manifests-result }}
PUBLISH_HELM_CHART_RESULT: ${{ inputs.publish-helm-chart-result }}
COMBINED_CHECKS_RESULT: ${{ inputs.combined-checks-result }}
BUILD_RESULT: ${{ inputs.build-result }}

DASHBOARD_URL: ${{ inputs.dashboard-url }}
Expand All @@ -60,6 +64,7 @@ runs:

echo "PUBLISH_MANIFESTS_RESULT=$PUBLISH_MANIFESTS_RESULT" | tee -a "$GITHUB_OUTPUT"
echo "PUBLISH_HELM_CHART_RESULT=$PUBLISH_HELM_CHART_RESULT" | tee -a "$GITHUB_OUTPUT"
echo "COMBINED_CHECKS_RESULT=$COMBINED_CHECKS_RESULT" | tee -a "$GITHUB_OUTPUT"
echo "BUILD_RESULT=$BUILD_RESULT" | tee -a "$GITHUB_OUTPUT"
elif [ "$NOTIFICATION_TYPE" == "integration-test" ]; then
[ -z "${DASHBOARD_URL:-}" ] && echo "The dashboard-url input must be provided" && exit 1
Expand Down Expand Up @@ -105,6 +110,8 @@ runs:
FAILED_TESTS: ${{ steps.valid_inputs.outputs.FAILED_TESTS }}
TEST_HEALTH: ${{ steps.valid_inputs.outputs.TEST_HEALTH }}
TEST_RESULT: ${{ steps.valid_inputs.outputs.TEST_RESULT }}
# Catch-all combined checks result
COMBINED_CHECKS_RESULT: ${{ steps.valid_inputs.outputs.COMBINED_CHECKS_RESULT }}
# General/common values
NOTIFICATION_TYPE: ${{ steps.valid_inputs.outputs.NOTIFICATION_TYPE }}
GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }}
Expand All @@ -129,7 +136,7 @@ runs:
fi

# TODO (@Techassi): Also add success template
if [ "$PUBLISH_MANIFESTS_RESULT" = "failure" ] || [ "$PUBLISH_HELM_CHART_RESULT" = "failure" ] || [ "$BUILD_RESULT" = "failure" ]; then
if [ "$PUBLISH_MANIFESTS_RESULT" = "failure" ] || [ "$PUBLISH_HELM_CHART_RESULT" = "failure" ] || [ "$BUILD_RESULT" = "failure" ] || [ "$COMBINED_CHECKS_RESULT" = "failure" ]; then
export MESSAGE_VERB=failed
export MESSAGE_COLOR=aa0000
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ attachments:
- title: Build/Publish Helm Chart
short: true
value: "${PUBLISH_HELM_CHART_RESULT}"
- title: Checks
short: true
value: "${COMBINED_CHECKS_RESULT}"
actions:
- type: button
text: Go to workflow run
Expand Down
Loading