Skip to content
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
.github/CODEOWNERS @SonarSource/quality-data-ml-squad
.github/CODEOWNERS @SonarSource/code-quality-ci-experience-squad
37 changes: 0 additions & 37 deletions .github/workflows/MacOsNightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,40 +81,3 @@ jobs:

- name: Execute the integration tests
run: ./.github/scripts/run_its.sh

notify-on-failure:
name: "Notify on Failure"
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
needs: [qa-macos, its-macos]
if: failure() && github.event_name == 'schedule'
steps:
- name: Write failure summary
run: |
echo "## macOS Nightly Build Failed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "The scheduled macOS nightly build has failed." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Workflow Run:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY

- name: Vault Secrets
id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/kv/data/slack token | SLACK_TOKEN;

- name: Send Slack notification
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2.3.3
env:
SLACK_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SLACK_TOKEN }}
SLACK_CHANNEL: squad-python-notifs
SLACK_COLOR: danger
SLACK_TITLE: Build Failed
SLACK_MESSAGE: |
Workflow failed in ${{ github.repository }} 🚨
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
SLACK_USERNAME: BuildBot

45 changes: 36 additions & 9 deletions .github/workflows/SlackNotify.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,49 @@
---
name: Slack Notifications
on:
check_suite:
types: [completed]
workflow_run:
workflows:
- Build
- Iris sync
- Releasability status
- macOS Nightly Build
- sonar-release
types:
- completed

Comment thread
gitar-bot[bot] marked this conversation as resolved.
permissions:
contents: read
id-token: write
checks: read

jobs:
notify:
if: >-
contains(fromJSON('["main", "master"]'), github.event.check_suite.head_branch) || startsWith(github.event.check_suite.head_branch, 'dogfood-') || startsWith(github.event.check_suite.head_branch, 'branch-')
if: >
github.event.workflow_run.conclusion == 'failure' &&
(
github.event.workflow_run.name == 'sonar-release' ||
github.event.workflow_run.head_branch == 'master' ||
startsWith(github.event.workflow_run.head_branch, 'branch-') ||
startsWith(github.event.workflow_run.head_branch, 'dogfood-')
)
runs-on: ubuntu-latest
steps:
- name: Vault Secrets
id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets: |
development/kv/data/slack token | SLACK_TOKEN;

- name: Send Slack Notification
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2.3.3
env:
GITHUB_TOKEN: ${{ github.token }}
uses: SonarSource/gh-action_slack-notify@9532fdcfa4143ed5da2da7b0e77172abbe24ae33 # 1.0.2
with:
slackChannel: squad-python-notifs
SLACK_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SLACK_TOKEN }}
SLACK_CHANNEL: ops-ci-experience
SLACK_COLOR: danger
SLACK_TITLE: Workflow Failed
SLACK_MESSAGE: |
Workflow failed in ${{ github.repository }} 🚨
Workflow: ${{ github.event.workflow_run.name }}
Branch: ${{ github.event.workflow_run.head_branch }}
${{ github.event.workflow_run.html_url }}
SLACK_USERNAME: BuildBot
Loading