Skip to content
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

[DCJ-28] Slack DCJ team on release failures, retries #268

Merged
merged 1 commit into from
Apr 19, 2024
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
26 changes: 2 additions & 24 deletions .github/workflows/chart-releaser.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
name: Release helm charts

on:
workflow_dispatch:
inputs:
notify-slack:
default: true
type: boolean
workflow_call:
inputs:
notify-slack:
default: false
type: boolean
workflow_dispatch: {}
workflow_call: {}

jobs:
release_chart:
Expand Down Expand Up @@ -42,17 +34,3 @@ jobs:
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: "true"

- name: "Notify Slack"
if: ${{ inputs.notify-slack && always() }}
uses: broadinstitute/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }} # required to work with job field
with:
status: ${{ job.status }}
fields: job,repo,message
channel: "#jade-spam"
username: "datarepo-helm actions"
text: "Release Helm Charts"
28 changes: 3 additions & 25 deletions .github/workflows/integrationChartBump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,8 @@ env:
charts: gcloud-sqlproxy datarepo-api datarepo-ui oidc-proxy create-secret-manager-secret

on:
workflow_dispatch:
inputs:
notify-slack:
default: true
type: boolean
workflow_call:
inputs:
notify-slack:
default: false
type: boolean
workflow_dispatch: {}
workflow_call: {}

jobs:
indivdual_chart_promotion:
Expand Down Expand Up @@ -89,20 +81,6 @@ jobs:
- name: "[${{ matrix.repo }}] Merge multi chart version update"
uses: broadinstitute/datarepo-actions/actions/[email protected]
env:
COMMIT_MESSAGE: "Datarepo Integration mutli chart version update"
COMMIT_MESSAGE: "Datarepo Integration multi chart version update"
GITHUB_REPO: ${{ matrix.repo }}
SWITCH_DIRECTORIES: "true"

- name: "Notify Slack"
if: ${{ inputs.notify-slack && always() }}
uses: broadinstitute/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }} # required to work with job field
with:
status: ${{ job.status }}
fields: job,repo,message
channel: "#jade-spam"
username: "datarepo-helm actions"
text: "Integration Chart Promotion"
35 changes: 11 additions & 24 deletions .github/workflows/releasedr.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
name: Create chart Datarepo chart

on:
workflow_dispatch:
inputs:
notify-slack:
default: true
type: boolean
workflow_call:
inputs:
notify-slack:
default: false
type: boolean
workflow_dispatch: {}
workflow_call: {}
push:
branches:
- master
Expand Down Expand Up @@ -90,20 +82,6 @@ jobs:
GITHUB_REPO: datarepo-helm
MERGE_BRANCH: master

- name: "Notify Slack"
if: ${{ (github.event_name == 'push' && always()) || (inputs.notify-slack && always()) }} # workflow_call has own slack notification
uses: broadinstitute/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }} # required to work with job field
with:
status: ${{ job.status }}
fields: job,repo,message
channel: "#jade-spam"
username: "datarepo-helm actions"
text: "Create Datarepo Chart"

report-chart-to-sherlock:
name: Report Chart Version to DevOps
needs: [release_new_umbrella_dr]
Expand All @@ -130,3 +108,12 @@ jobs:
sync-git-token: ${{ secrets.BROADBOT_TOKEN }}
permissions:
id-token: write

report-workflow:
uses: broadinstitute/sherlock/.github/workflows/client-report-workflow.yaml@main
with:
relates-to-chart-releases: 'datarepo-dev'
notify-slack-channels-upon-workflow-failure: ${{ vars.SLACK_NOTIFICATION_CHANNELS }}
notify-slack-channels-upon-workflow-retry: ${{ vars.SLACK_NOTIFICATION_CHANNELS }}
permissions:
id-token: write
28 changes: 8 additions & 20 deletions .github/workflows/releasedrumbrella.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,11 @@ jobs:
needs: release_new_umbrella_dr
uses: ./.github/workflows/integrationChartBump.yaml
secrets: inherit
notify_slack:
needs:
- release_new_umbrella_dr
- release_umbrella_helm_charts
- integration_chart_promotion
runs-on: ubuntu-latest
if: always()
steps:
- name: "Notify Slack"
uses: broadinstitute/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }} # required to work with job field
with:
status: ${{ contains(needs.*.result, 'failure') && 'failure' || 'success' }}
fields: job,repo,message
channel: "#jade-spam"
username: "datarepo-helm actions"
text: "Release Datarepo Chart"
report-workflow:
uses: broadinstitute/sherlock/.github/workflows/client-report-workflow.yaml@main
with:
relates-to-chart-releases: 'datarepo-dev'
notify-slack-channels-upon-workflow-failure: ${{ vars.SLACK_NOTIFICATION_CHANNELS }}
notify-slack-channels-upon-workflow-retry: ${{ vars.SLACK_NOTIFICATION_CHANNELS }}
permissions:
id-token: write
Loading