-
Notifications
You must be signed in to change notification settings - Fork 1
150 lines (140 loc) · 5.63 KB
/
Copy pathdispatch.yml
File metadata and controls
150 lines (140 loc) · 5.63 KB
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Dispatch ⛟
permissions:
id-token: write
contents: write
issues: write
on:
workflow_dispatch:
inputs:
environment:
type: environment
required: true
description: Environment to deploy to
DEPLOY_BACKEND:
type: boolean
required: true
default: true
description: DEPLOY_BACKEND
DEPLOY_FEATURES_API:
type: boolean
required: true
default: false
description: DEPLOY_FEATURES_API
DEPLOY_ROUTES:
type: boolean
required: true
default: false
description: DEPLOY_ROUTES
DEPLOY_SM2A:
type: boolean
required: true
default: false
description: DEPLOY_SM2A
DEPLOY_MONITORING:
type: boolean
required: true
default: false
description: DEPLOY_MONITORING
DEPLOY_TITILER_MULTIDIM:
type: boolean
required: true
default: false
description: DEPLOY_TITILER_MULTIDIM
DEPLOY_S3_DISASTER_RECOVERY:
type: boolean
required: true
default: false
description: DEPLOY_S3_DISASTER_RECOVERY
DEPLOY_TITILER_CMR:
type: boolean
required: true
default: false
description: DEPLOY_TITILER_CMR
run-name: |
Dispatch to ${{ inputs.environment }}
BACKEND=${{ inputs.DEPLOY_BACKEND }}
FEATURES=${{ inputs.DEPLOY_FEATURES_API }}
ROUTES=${{ inputs.DEPLOY_ROUTES }}
SM2A=${{ inputs.DEPLOY_SM2A }}
MONITORING=${{ inputs.DEPLOY_MONITORING }}
TITILER_MULTIDIM=${{ inputs.DEPLOY_TITILER_MULTIDIM }}
TITILER_CMR=${{ inputs.DEPLOY_TITILER_CMR }} ⛟
env:
DEPLOY_BACKEND: ${{ github.event.inputs.DEPLOY_BACKEND }}
DEPLOY_FEATURES_API: ${{ github.event.inputs.DEPLOY_FEATURES_API }}
DEPLOY_ROUTES: ${{ github.event.inputs.DEPLOY_ROUTES }}
DEPLOY_SM2A: ${{ github.event.inputs.DEPLOY_SM2A }}
DEPLOY_MONITORING: ${{ github.event.inputs.DEPLOY_MONITORING }}
DEPLOY_TITILER_MULTIDIM: ${{ github.event.inputs.DEPLOY_TITILER_MULTIDIM }}
DEPLOY_S3_DISASTER_RECOVERY: ${{ github.event.inputs.DEPLOY_S3_DISASTER_RECOVERY }}
DEPLOY_TITILER_CMR: ${{ github.event.inputs.DEPLOY_TITILER_CMR }}
jobs:
check-environment:
runs-on: ubuntu-latest
name: Got ${{ github.event.inputs.environment }}
steps:
# Production deploys require manual approval and each prod environment has its own approver list (submit PR to change).
- name: Manual deployment approval (ghgc-mcp-production-blue)
if: ${{ github.event.inputs.environment == 'ghgc-mcp-production-blue' }}
uses: trstringer/manual-approval@v1
timeout-minutes: 60 # The approver will have 1 hour to approve this request
# Why 1h? Because GitHub App tokens expire after 1 hour which implies duration
# for the approval cannot exceed 60 minutes or the job will fail due to bad credentials
with:
secret: ${{ secrets.GITHUB_TOKEN }}
approvers: amarouane-ABDELHAK,slesaad,anayeaye,smohiudd,botanical,ividito,sandrahoang686,aliziel
minimum-approvals: 1
issue-title: "Deploying to ghgc-mcp-production-blue"
issue-body: "Please approve or deny the deployment"
- name: Manual deployment approval (mcp-prod)
if: ${{ github.event.inputs.environment == 'mcp-prod' }}
uses: trstringer/manual-approval@v1
timeout-minutes: 60
with:
secret: ${{ secrets.GITHUB_TOKEN }}
approvers: amarouane-ABDELHAK,slesaad,anayeaye,smohiudd,botanical,ividito,sandrahoang686,aliziel
minimum-approvals: 1
issue-title: "Deploying to mcp-prod"
issue-body: "Please approve or deny the deployment"
- name: Manual deployment approval (eic-prod)
if: ${{ github.event.inputs.environment == 'eic-prod' }}
uses: trstringer/manual-approval@v1
timeout-minutes: 60
with:
secret: ${{ secrets.GITHUB_TOKEN }}
approvers: amarouane-ABDELHAK,slesaad,anayeaye,smohiudd,botanical,ividito,sandrahoang686,aliziel
minimum-approvals: 1
issue-title: "Deploying to eic-prod"
issue-body: "Please approve or deny the deployment"
- name: Manual deployment approval (disasters-prod)
if: ${{ github.event.inputs.environment == 'disasters-prod' }}
uses: trstringer/manual-approval@v1
timeout-minutes: 60
with:
secret: ${{ secrets.GITHUB_TOKEN }}
approvers: anayeaye,smohiudd,botanical,ividito,sandrahoang686,aliziel
minimum-approvals: 1
issue-title: "Deploying to disasters-prod"
issue-body: "Please approve or deny the deployment"
deploy-veda-components:
name: Deploy VEDA Components
uses: "./.github/workflows/deploy.yml"
needs: check-environment
with:
environment: ${{ github.event.inputs.environment }}
DEPLOY_BACKEND: ${{ github.event.inputs.DEPLOY_BACKEND }}
DEPLOY_FEATURES_API: ${{ github.event.inputs.DEPLOY_FEATURES_API }}
DEPLOY_ROUTES: ${{ github.event.inputs.DEPLOY_ROUTES }}
DEPLOY_SM2A: ${{ github.event.inputs.DEPLOY_SM2A }}
DEPLOY_MONITORING: ${{ github.event.inputs.DEPLOY_MONITORING }}
DEPLOY_TITILER_MULTIDIM: ${{ github.event.inputs.DEPLOY_TITILER_MULTIDIM }}
DEPLOY_S3_DISASTER_RECOVERY: ${{ github.event.inputs.DEPLOY_S3_DISASTER_RECOVERY }}
DEPLOY_TITILER_CMR: ${{ github.event.inputs.DEPLOY_TITILER_CMR }}
secrets: inherit
update-deployment-status:
name: Update Deployment Status
uses: "./.github/workflows/update_deployment_status.yml"
needs: deploy-veda-components
with:
environment: ${{ github.event.inputs.environment }}
secrets: inherit