-
Notifications
You must be signed in to change notification settings - Fork 753
146 lines (126 loc) · 4.08 KB
/
lf-production-deploy-new.yaml
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
name: LF Production Deploy New
on:
workflow_dispatch:
inputs:
deploy_search_sync_worker:
description: Deploy search-sync-worker service?
required: true
type: boolean
deploy_integration_sync_worker:
description: Deploy integration-sync-worker service?
required: true
type: boolean
deploy_webhook_api:
description: Deploy webhook-api service?
required: true
type: boolean
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
CROWD_CLUSTER: ${{ secrets.LF_PRODUCTION_CLUSTER_NAME }}
CROWD_ROLE_ARN: ${{ secrets.LF_PRODUCTION_CLUSTER_ROLE_ARN }}
AWS_ACCESS_KEY_ID: ${{ secrets.LF_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.LF_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.LF_AWS_REGION }}
SLACK_CHANNEL: deploys-lf
SLACK_WEBHOOK: ${{ secrets.LF_PRODUCTION_SLACK_CHANNEL_HOOK }}
jobs:
build-and-push-search-sync-worker:
runs-on: ubuntu-latest
if: ${{ inputs.deploy_search_sync_worker }}
outputs:
image: ${{ steps.image.outputs.IMAGE }}
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: ./.github/actions/build-docker-image
id: image-builder
with:
image: search-sync-worker
- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT
build-and-push-integration-sync-worker:
runs-on: ubuntu-latest
if: ${{ inputs.deploy_integration_sync_worker }}
outputs:
image: ${{ steps.image.outputs.IMAGE }}
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: ./.github/actions/build-docker-image
id: image-builder
with:
image: integration-sync-worker
- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT
build-and-push-webhook-api:
runs-on: ubuntu-latest
if: ${{ inputs.deploy_webhook_api }}
outputs:
image: ${{ steps.image.outputs.IMAGE }}
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: ./.github/actions/build-docker-image
id: image-builder
with:
image: webhook-api
- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT
deploy-search-sync-worker:
needs: build-and-push-search-sync-worker
runs-on: ubuntu-latest
if: ${{ inputs.deploy_search_sync_worker }}
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: ./.github/actions/deploy-service
with:
service: search-sync-worker
image: ${{ needs.build-and-push-search-sync-worker.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}
deploy-integration-sync-worker:
needs: build-and-push-integration-sync-worker
runs-on: ubuntu-latest
if: ${{ inputs.deploy_integration_sync_worker }}
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: ./.github/actions/deploy-service
with:
service: integration-sync-worker
image: ${{ needs.build-and-push-integration-sync-worker.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}
deploy-webhook-api:
needs: build-and-push-webhook-api
runs-on: ubuntu-latest
if: ${{ inputs.deploy_webhook_api }}
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: ./.github/actions/deploy-service
with:
service: webhook-api
image: ${{ needs.build-and-push-webhook-api.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}