Skip to content

Commit

Permalink
add failure notification on timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
taraepp committed Oct 13, 2023
1 parent 6d42426 commit 4e3d0c3
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/testing-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ name: Testing this as part of a workflow
on:
pull_request:

env:
ENVIRONMENT: dev

jobs:
test-schemaspy-rollout:
name: test-schemaspy-rollout
name: test-schemaspy-rollout
runs-on: ubuntu-20.04
steps:
- name: Install oc
Expand All @@ -22,11 +25,17 @@ jobs:

- name: Restart SchemaSpy pods
run: |
oc -n 4c2ba9-dev rollout restart deployment/schemaspy
oc -n 4c2ba9-${{ env.ENVIRONMENT }} rollout restart deployment/schemaspy
- name: Watch Rollout Status
- name: Watch Rollout Status
run: |
oc -n 4c2ba9-dev rollout status deployment/schemaspy
oc -n 4c2ba9-{{ env.ENVIRONMENT }} rollout status deployment/schemaspy
timeout-minutes: 10

- name: Notification
run: ./gitops/notify_discord.sh schemaspy dev ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} 0
- name: Notify Discord of Rollout success
if: ${{ success() }}
run: ./gitops/notify_discord.sh schemaspy {{ env.ENVIRONMENT }} ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} 0

- name: Notify Discord of Rollout failure
if: ${{ failure() }}
run: ./gitops/notify_discord.sh schemaspy {{ env.ENVIRONMENT }} ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} 1

0 comments on commit 4e3d0c3

Please sign in to comment.