Skip to content

Deploy: STAGING

Deploy: STAGING #15

name: "Deploy: STAGING"
concurrency:
group: deploy-staging-${{ github.repository }}
on:
workflow_dispatch:
inputs:
confirm:
description: 'Type "CONFIRM" to deploy to STAGING.'
required: true
type: string
jobs:
workflow-inputs:
name: Display Workflow Inputs
if: ${{ github.event.inputs.confirm == 'CONFIRM' }}
runs-on: ubuntu-20.04
steps:
- name: Output inputs
run: |-
echo "## Workflow inputs" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "${{ toJSON(github.event.inputs) }}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
bump-appversion:
name: Bump appVersion
if: ${{ github.event.inputs.confirm == 'CONFIRM' }}
uses: slateci/github-actions/.github/workflows/chart-bump-appversion.yml@v17
with:
helm_release_namespace: staging
helm_release_prefix: slate-portal
secrets:
gc_compute_zone: ${{ secrets.GCLOUD_COMPUTE_ZONE }}
gc_gke_cluster: ${{ secrets.GCLOUD_GKE_CLUSTER }}
gc_service_account: ${{ secrets.GCLOUD_SERVICE_ACCOUNT }}
gc_workload_identity_provider: ${{ secrets.GCLOUD_WORKLOAD_IDENTITY_PROVIDER }}
workflow-props:
name: Workflow Properties
if: ${{ github.event.inputs.confirm == 'CONFIRM' }}
needs:
- bump-appversion
uses: slateci/github-actions/.github/workflows/workflow-props.yml@v17
with:
helm_release_namespace: staging
checks:
name: Checks
if: ${{ github.event.inputs.confirm == 'CONFIRM' }}
needs:
- workflow-props
uses: slateci/github-actions/.github/workflows/chart-release-checks.yml@v17
with:
helm_release_namespace: staging
helm_release_prefix: slate-portal
secrets:
gc_compute_zone: ${{ secrets.GCLOUD_COMPUTE_ZONE }}
gc_gke_cluster: ${{ secrets.GCLOUD_GKE_CLUSTER }}
gc_service_account: ${{ secrets.GCLOUD_SERVICE_ACCOUNT }}
gc_workload_identity_provider: ${{ secrets.GCLOUD_WORKLOAD_IDENTITY_PROVIDER }}
image:
name: Build/Push Image
if: ${{ github.event.inputs.confirm == 'CONFIRM' }}
needs:
- checks
uses: slateci/github-actions/.github/workflows/image-build-push.yml@v17
with:
cr_domain: hub.opensciencegrid.org
cr_repository: slate-portal
helm_release_namespace: staging
secrets:
cr_password: ${{ secrets.CR_PASSWORD }}
cr_username: ${{ secrets.CR_USERNAME }}
google:
name: Google Cloud
if: ${{ github.event.inputs.confirm == 'CONFIRM' }}
needs:
- image
uses: slateci/github-actions/.github/workflows/helm-upgrade.yml@v17
with:
helm_release_namespace: staging
helm_release_prefix: slate-portal
secrets:
gc_compute_zone: ${{ secrets.GCLOUD_COMPUTE_ZONE }}
gc_gke_cluster: ${{ secrets.GCLOUD_GKE_CLUSTER }}
gc_service_account: ${{ secrets.GCLOUD_SERVICE_ACCOUNT }}
gc_workload_identity_provider: ${{ secrets.GCLOUD_WORKLOAD_IDENTITY_PROVIDER }}
notifications:
name: Notifications
runs-on: ubuntu-20.04
needs:
- workflow-inputs
- bump-appversion
- workflow-props
- checks
- image
- google
if: ${{ always() && (needs.workflow-inputs.result == 'failure' || needs.bump-appversion.result == 'failure' || needs.workflow-props.result == 'failure' || needs.checks.result == 'failure' || needs.image.result == 'failure' || needs.google.result == 'failure') }}
steps:
- name: Notify Slack of Failure
uses: slateci/github-actions/.github/actions/slack-notify-failure@v17
with:
slack_bot_token: '${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}'