Skip to content

notify slack channel #tmp-smoke-failures smoke failures for allowing troubleshooting in the background #3648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 20, 2023
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ jobs:
with:
runs-on: ubuntu-latest
junit-results-glob-pattern: "*smoke-tests*.xml"
slack-notification: false
slack-notification: true
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this secret from the Settings, once this gets merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont have admin permissions on the repo ... do you ? in case not, ill open a ticket with corp

SLACK_BOT_TOKEN: ${{ secrets.WEAVEWORKS_SLACK_GENERICBOT_TOKEN }}

notify-failure:
name: Notify Slack on Failure
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/publish-test-results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@ jobs:
id: test-report
uses: mikepenz/action-junit-report@0831a82caad2465c31c6dd929978f640cb42556c # v4.0.3
if: always()
continue-on-error: true
with:
fail_on_failure: true
annotate_only: true # it wont add a build check so we dont want the build to fail if smokes fail
report_paths: ${{ env.TEST_RESULTS_PATH }}/**/${{ inputs.junit-results-glob-pattern }}
- name: Notify slack of test results
if: ${{ (inputs.slack-notification) && (github.event_name != 'workflow_dispatch') }}
uses: archive/github-actions-slack@d9dae40827adf93bddf939db6552d1e392259d7d # v2.7.0
id: slack
uses: slackapi/slack-github[email protected]
if: ${{ steps.test-report.outcome == 'failure' && github.ref == 'refs/heads/main' }}
with:
channel-id: C03FDNVE7RC
slack-message: "*${{inputs.check-name}}*\n>Tests :test_tube:\t\t\tPassed :check:\t\t\tSkipped :arrow_right_hook:\t\t\tFailed :x:\n>${{steps.test-report.outputs.total}} runs\t\t\t ${{steps.test-report.outputs.passed}} passed\t\t\t ${{steps.test-report.outputs.skipped}} skipped\t\t\t ${{steps.test-report.outputs.failed}} failed"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: C063ZPPJC5U # tmp-tolerant-failures
slack-text: |
:sad-parrot: The <https://github.com/weaveworks/weave-gitops-enterprise/commit/${{ github.sha }}|latest commit> from ${{ github.actor }} is failing on main. <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here> and weep. Then fix the underlying issue and ensure main remains green.
slack-optional-icon_url: "https://avatars.githubusercontent.com/u/9976052"