Skip to content

Commit 8f9871e

Browse files
loicsaintrochUroš Maroltgarrrikkotuaepipav
authored
Init new emails worker (#1766)
Co-authored-by: Uroš Marolt <[email protected]> Co-authored-by: Igor Kotua <[email protected]> Co-authored-by: anilb <[email protected]>
1 parent 785cad4 commit 8f9871e

File tree

241 files changed

+21880
-2394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+21880
-2394
lines changed

.github/workflows/lf-production-deploy-new.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
description: Deploy automations-worker service?
2424
required: true
2525
type: boolean
26+
deploy_emails_worker:
27+
description: Deploy emails-worker service?
28+
required: true
29+
type: boolean
2630
deploy_script_executor:
2731
description: Deploy script-executor service?
2832
required: true
@@ -145,6 +149,27 @@ jobs:
145149
id: image
146150
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT
147151

152+
build-and-push-emails-worker:
153+
runs-on: ubuntu-latest
154+
if: ${{ inputs.deploy_emails_worker }}
155+
outputs:
156+
image: ${{ steps.image.outputs.IMAGE }}
157+
defaults:
158+
run:
159+
shell: bash
160+
steps:
161+
- name: Check out repository code
162+
uses: actions/checkout@v2
163+
164+
- uses: ./.github/actions/build-docker-image
165+
id: image-builder
166+
with:
167+
image: emails-worker
168+
169+
- name: Set docker image output
170+
id: image
171+
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT
172+
148173
build-and-push-script-executor:
149174
runs-on: ubuntu-latest
150175
if: ${{ inputs.deploy_script_executor }}
@@ -256,6 +281,24 @@ jobs:
256281
image: ${{ needs.build-and-push-automations-worker.outputs.image }}
257282
cluster: ${{ env.CROWD_CLUSTER }}
258283

284+
deploy-emails-worker:
285+
needs: build-and-push-emails-worker
286+
runs-on: ubuntu-latest
287+
if: ${{ inputs.deploy_emails_worker }}
288+
defaults:
289+
run:
290+
shell: bash
291+
292+
steps:
293+
- name: Check out repository code
294+
uses: actions/checkout@v2
295+
296+
- uses: ./.github/actions/deploy-service
297+
with:
298+
service: emails-worker
299+
image: ${{ needs.build-and-push-emails-worker.outputs.image }}
300+
cluster: ${{ env.CROWD_CLUSTER }}
301+
259302
deploy-script-executor:
260303
needs: build-and-push-script-executor
261304
runs-on: ubuntu-latest
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: LF Staging Deploy Emails Worker
2+
3+
on:
4+
push:
5+
branches:
6+
- 'lf-staging/**'
7+
- 'lf-staging-**'
8+
paths:
9+
- 'services/libs/**'
10+
- 'services/apps/emails_worker/**'
11+
12+
env:
13+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
14+
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
15+
CROWD_CLUSTER: ${{ secrets.LF_STAGING_CLUSTER_NAME }}
16+
CROWD_ROLE_ARN: ${{ secrets.LF_STAGING_CLUSTER_ROLE_ARN }}
17+
AWS_ACCESS_KEY_ID: ${{ secrets.LF_AWS_ACCESS_KEY_ID }}
18+
AWS_SECRET_ACCESS_KEY: ${{ secrets.LF_AWS_SECRET_ACCESS_KEY }}
19+
AWS_REGION: ${{ secrets.LF_AWS_REGION }}
20+
SLACK_CHANNEL: deploys-lf-staging
21+
SLACK_WEBHOOK: ${{ secrets.LF_STAGING_SLACK_CHANNEL_HOOK }}
22+
23+
jobs:
24+
build-and-push:
25+
runs-on: ubuntu-latest
26+
outputs:
27+
image: ${{ steps.image.outputs.IMAGE }}
28+
defaults:
29+
run:
30+
shell: bash
31+
32+
steps:
33+
- name: Check out repository code
34+
uses: actions/checkout@v2
35+
36+
- uses: ./.github/actions/build-docker-image
37+
id: image-builder
38+
with:
39+
image: emails-worker
40+
41+
- name: Set docker image output
42+
id: image
43+
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT
44+
45+
deploy-emails-worker:
46+
needs: build-and-push
47+
runs-on: ubuntu-latest
48+
defaults:
49+
run:
50+
shell: bash
51+
52+
steps:
53+
- name: Check out repository code
54+
uses: actions/checkout@v2
55+
56+
- uses: ./.github/actions/deploy-service
57+
with:
58+
service: emails-worker
59+
image: ${{ needs.build-and-push.outputs.image }}
60+
cluster: ${{ env.CROWD_CLUSTER }}

.github/workflows/production-deploy-new.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
description: Deploy automations-worker service?
2424
required: true
2525
type: boolean
26+
deploy_emails_worker:
27+
description: Deploy emails-worker service?
28+
required: true
29+
type: boolean
2630
deploy_script_executor:
2731
description: Deploy script-executor service?
2832
required: true
@@ -145,6 +149,27 @@ jobs:
145149
id: image
146150
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT
147151

152+
build-and-push-emails-worker:
153+
runs-on: ubuntu-latest
154+
if: ${{ inputs.deploy_emails_worker }}
155+
outputs:
156+
image: ${{ steps.image.outputs.IMAGE }}
157+
defaults:
158+
run:
159+
shell: bash
160+
steps:
161+
- name: Check out repository code
162+
uses: actions/checkout@v2
163+
164+
- uses: ./.github/actions/build-docker-image
165+
id: image-builder
166+
with:
167+
image: emails-worker
168+
169+
- name: Set docker image output
170+
id: image
171+
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT
172+
148173
build-and-push-script-executor:
149174
runs-on: ubuntu-latest
150175
if: ${{ inputs.deploy_script_executor }}
@@ -256,6 +281,24 @@ jobs:
256281
image: ${{ needs.build-and-push-automations-worker.outputs.image }}
257282
cluster: ${{ env.CROWD_CLUSTER }}
258283

284+
deploy-emails-worker:
285+
needs: build-and-push-emails-worker
286+
runs-on: ubuntu-latest
287+
if: ${{ inputs.deploy_emails_worker }}
288+
defaults:
289+
run:
290+
shell: bash
291+
292+
steps:
293+
- name: Check out repository code
294+
uses: actions/checkout@v2
295+
296+
- uses: ./.github/actions/deploy-service
297+
with:
298+
service: emails-worker
299+
image: ${{ needs.build-and-push-emails-worker.outputs.image }}
300+
cluster: ${{ env.CROWD_CLUSTER }}
301+
259302
deploy-script-executor:
260303
needs: build-and-push-script-executor
261304
runs-on: ubuntu-latest

.github/workflows/staging-deploy-automations-worker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- 'staging-**'
88
paths:
99
- 'services/libs/**'
10-
- 'services/apps/automations-worker/**'
10+
- 'services/apps/automations_worker/**'
1111

1212
env:
1313
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Staging Deploy Emails Worker
2+
3+
on:
4+
push:
5+
branches:
6+
- 'staging/**'
7+
- 'staging-**'
8+
paths:
9+
- 'services/libs/**'
10+
- 'services/apps/emails_worker/**'
11+
12+
env:
13+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
14+
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
15+
CROWD_CLUSTER: ${{ secrets.STAGING_CLUSTER_NAME }}
16+
CROWD_ROLE_ARN: ${{ secrets.STAGING_CLUSTER_ROLE_ARN }}
17+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
18+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
19+
AWS_REGION: ${{ secrets.AWS_REGION }}
20+
SLACK_CHANNEL: deploys-staging
21+
SLACK_WEBHOOK: ${{ secrets.STAGING_SLACK_CHANNEL_HOOK }}
22+
23+
jobs:
24+
build-and-push:
25+
runs-on: ubuntu-latest
26+
outputs:
27+
image: ${{ steps.image.outputs.IMAGE }}
28+
defaults:
29+
run:
30+
shell: bash
31+
32+
steps:
33+
- name: Check out repository code
34+
uses: actions/checkout@v2
35+
36+
- uses: ./.github/actions/build-docker-image
37+
id: image-builder
38+
with:
39+
image: emails-worker
40+
41+
- name: Set docker image output
42+
id: image
43+
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT
44+
45+
deploy-emails-worker:
46+
needs: build-and-push
47+
runs-on: ubuntu-latest
48+
defaults:
49+
run:
50+
shell: bash
51+
52+
steps:
53+
- name: Check out repository code
54+
uses: actions/checkout@v2
55+
56+
- uses: ./.github/actions/deploy-service
57+
with:
58+
service: emails-worker
59+
image: ${{ needs.build-and-push.outputs.image }}
60+
cluster: ${{ env.CROWD_CLUSTER }}

backend/.env.dist.local

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ CROWD_ANALYTICS_API_TOKEN=
170170
# Temporal
171171
CROWD_TEMPORAL_SERVER_URL=localhost:7233
172172
CROWD_TEMPORAL_NAMESPACE=default
173+
CROWD_TEMPORAL_ENCRYPTION_KEY_ID=local
174+
CROWD_TEMPORAL_ENCRYPTION_KEY=FweBMRnGCLshER8FlSvNusQA6G3MRUKt
173175

174176
# Seach sync api
175177
CROWD_SEARCH_SYNC_API_URL=http://search-sync-api:8083

backend/.env.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ CROWD_SQS_PORT=9325
99

1010
# Temporal settings
1111
CROWD_TEMPORAL_SERVER_URL=localhost:7234
12+
CROWD_TEMPORAL_ENCRYPTION_KEY_ID=test
13+
CROWD_TEMPORAL_ENCRYPTION_KEY=dXfA98nyNcIuvW1RZecqEIREKgDMnGjF

0 commit comments

Comments
 (0)