Skip to content

Commit

Permalink
[TT-1609] Notify about compatibility pipeline failure if building ima…
Browse files Browse the repository at this point in the history
…ge failed (#14358)

* notify on slack if building chainlink image failed in compat pipeline

* fail image build on purpose

* change order of checks

* remove failure on purpose

* fail cron test on purpose

* remove on-purpose test failure
  • Loading branch information
Tofel authored Sep 6, 2024
1 parent b1c59dd commit 606e530
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/client-compatibility-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,21 @@ jobs:
id: should-run
run: |
if [ "${{ needs.check-dependency-bump.outputs.dependency_changed }}" == "true" ]; then
echo "## Build trigger" >> $GITHUB_STEP_SUMMARY
echo "go-ethereum dependency bump" >> $GITHUB_STEP_SUMMARY
echo "Will run tests, because go-ethereum dependency was bumped"
echo "should_run=true" >> $GITHUB_OUTPUT
elif [ "$GITHUB_EVENT_NAME" = "schedule" ]; then
echo "## Build trigger" >> $GITHUB_STEP_SUMMARY
echo "schedule" >> $GITHUB_STEP_SUMMARY
echo "Will run tests, because trigger event was $GITHUB_EVENT_NAME"
echo "should_run=true" >> $GITHUB_OUTPUT
elif [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ]; then
echo "Will run tests, because trigger event was $GITHUB_EVENT_NAME"
echo "should_run=true" >> $GITHUB_OUTPUT
elif [ "$GITHUB_REF_TYPE" = "tag" ]; then
echo "## Build trigger" >> $GITHUB_STEP_SUMMARY
echo "new tag" >> $GITHUB_STEP_SUMMARY
echo "Will run tests, because new tag was created"
echo "should_run=true" >> $GITHUB_OUTPUT
else
Expand Down Expand Up @@ -696,7 +702,7 @@ jobs:
id-token: write
contents: read
runs-on: ubuntu-latest
needs: [run-client-compatibility-matrix, should-run, select-versions]
needs: [run-client-compatibility-matrix, should-run, select-versions, build-chainlink, prepare-compatibility-matrix]
steps:
- name: Debug Result
run: echo ${{ join(needs.*.result, ',') }}
Expand All @@ -709,7 +715,7 @@ jobs:
{
"attachments": [
{
"color": "${{ contains(join(needs.*.result, ','), 'failure') && '#C62828' || '#2E7D32' }}",
"color": "${{ (contains(join(needs.*.result, ','), 'failure') || needs.build-chainlink.result == 'failure') && '#C62828' || '#2E7D32' }}",
"blocks": [
{
"type": "header",
Expand All @@ -723,7 +729,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ contains(join(needs.*.result, ','), 'failure') && format('Some tests failed, notifying <!subteam^{0}|bix-ship-emergent-task>', secrets.COMPAT_SLACK_NOTIFICATION_HANDLE) || 'All Good!' }}"
"text": "${{ needs.prepare-compatibility-matrix.result == 'failure' && 'Failed to prepare test matrix, notifying <!subteam^S06US88D6AK|guardian-test-tooling>' || needs.build-chainlink.result == 'failure' && 'Failed to build Chainlink image, notifying <!subteam^S06US88D6AK|guardian-test-tooling>' || contains(join(needs.*.result, ','), 'failure') && format('Some tests failed, notifying <!subteam^{0}|bix-ship-emergent-task>', secrets.COMPAT_SLACK_NOTIFICATION_HANDLE) || 'All Good!' }}"
}
},
{
Expand Down

0 comments on commit 606e530

Please sign in to comment.