-
Notifications
You must be signed in to change notification settings - Fork 5
117 lines (106 loc) · 3.89 KB
/
deploy-staging.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
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@v16
with:
helm_release_namespace: staging
helm_release_prefix: slate-api
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@v16
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@v16
with:
helm_release_namespace: staging
helm_release_prefix: slate-api
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@v16
with:
cr_domain: hub.opensciencegrid.org
cr_repository: slate-api
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@v16
with:
helm_release_namespace: staging
helm_release_prefix: slate-api
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 }}
client-prerelease:
name: SLATE Remote Client Pre-release
if: ${{ github.event.inputs.confirm == 'CONFIRM' }}
needs:
- checks
uses: slateci/github-actions/.github/workflows/slate-client-prerelease.yml@v16
notifications:
name: Notifications
runs-on: ubuntu-20.04
needs:
- workflow-inputs
- bump-appversion
- workflow-props
- checks
- image
- google
- client-prerelease
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' || needs.client-prerelease.result == 'failure') }}
steps:
- name: Notify Slack of Failure
uses: slateci/github-actions/.github/actions/slack-notify-failure@v16
with:
slack_bot_token: '${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}'