-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MDS-5515] SchemaSpy updates (#2718)
* a test file to run on PR to find any obvious issues, and then a rollout to test and prod on workflow dispatch * testing reuse of watch-deployment * hey why can't you find my file * give it the repo so it can use script files * get rid of unnecessary test parts, add in argocd * testing to see if rollout status holds up discord notification * add failure notification on timeout * syntax error * test reusable workflow * some environment-specific workflows that call the reusable one, call it from core-api deploy workflows, and try to fix run-if-failed * just testing if secrets: inherit is necessary * just testing if secrets: inherit is necessary- but don't actually do a rollout this time * secrets: inherit is absolutely necessary for workflow_call- change calls from steps to jobs so context can be added * rename workflow with proper name * only rollout schemaspy after build/deploy is successful
- Loading branch information
Showing
7 changed files
with
100 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: SchemaSpy - DEV restart rollout | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
dev-schemaspy-rollout: | ||
uses: ./.github/workflows/schemaspy-rollout.yaml | ||
with: | ||
environment: dev | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: SchemaSpy - PROD restart rollout | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
dev-schemaspy-rollout: | ||
uses: ./.github/workflows/schemaspy-rollout.yaml | ||
with: | ||
environment: prod | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: SchemaSpy - TEST restart rollout | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
dev-schemaspy-rollout: | ||
uses: ./.github/workflows/schemaspy-rollout.yaml | ||
with: | ||
environment: test | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: SchemaSpy Rollout | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
schemaspy-rollout: | ||
name: schemaspy-rollout | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Install oc | ||
uses: redhat-actions/openshift-tools-installer@v1 | ||
with: | ||
oc: "4.7" | ||
|
||
- name: oc login | ||
run: | | ||
oc login --token=${{ secrets.BUILD_TOKEN }} --server=${{ secrets.CLUSTER_API }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Restart SchemaSpy pods | ||
run: | | ||
oc -n 4c2ba9-${{ inputs.environment }} rollout restart deployment/schemaspy | ||
- name: Watch Rollout Status | ||
run: | | ||
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 ${{ inputs.environment }} ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} 0 | ||
|
||
- name: Notify Discord of Rollout failure | ||
if: ${{ failure() }} | ||
run: ./gitops/notify_discord.sh schemaspy ${{ inputs.environment }} ${{ github.sha }} ${{ secrets.DISCORD_DEPLOYMENT_WEBHOOK }} 1 |