Skip to content

Commit

Permalink
test reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
taraepp committed Oct 19, 2023
1 parent c7c5bca commit 681885a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/schemaspy-rollout-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: SchemaSpy - DEV restart rollout

on:
pull_request:
workflow_dispatch:
push:
branches:
- develop
paths:
- migrations/sql

jobs:
dev-schemaspy-rollout:
uses: ./.github/workflows/schemaspy-rollout.yaml
with:
environment: dev
secrets: inherit
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Testing this as part of a workflow

on:
pull_request:

env:
ENVIRONMENT: dev
workflow_call:
inputs:
environment:
required: true
type: string

jobs:
test-schemaspy-rollout:
Expand All @@ -25,17 +26,17 @@ jobs:

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

- name: Notify Discord of Rollout success
if: ${{ success() }}
run: ./gitops/notify_discord.sh schemaspy ${{ env.ENVIRONMENT }} ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} 0
run: ./gitops/notify_discord.sh schemaspy ${{ inputs.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
run: ./gitops/notify_discord.sh schemaspy ${{ inputs.environment }} ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} 1

0 comments on commit 681885a

Please sign in to comment.