diff --git a/.github/workflows/schemaspy-rollout-dev.yaml b/.github/workflows/schemaspy-rollout-dev.yaml new file mode 100644 index 0000000000..db285f81cf --- /dev/null +++ b/.github/workflows/schemaspy-rollout-dev.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/testing-workflow.yaml b/.github/workflows/schemaspy-rollout.yaml similarity index 58% rename from .github/workflows/testing-workflow.yaml rename to .github/workflows/schemaspy-rollout.yaml index 794a052b66..763b3f1004 100644 --- a/.github/workflows/testing-workflow.yaml +++ b/.github/workflows/schemaspy-rollout.yaml @@ -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: @@ -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