Skip to content

Commit

Permalink
Init new emails worker (#1766)
Browse files Browse the repository at this point in the history
Co-authored-by: Uroš Marolt <uros@crowd.dev>
Co-authored-by: Igor Kotua <36304232+garrrikkotua@users.noreply.github.com>
Co-authored-by: anilb <epipav@gmail.com>
  • Loading branch information
4 people authored Nov 21, 2023
1 parent 785cad4 commit 8f9871e
Show file tree
Hide file tree
Showing 241 changed files with 21,880 additions and 2,394 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/lf-production-deploy-new.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
description: Deploy automations-worker service?
required: true
type: boolean
deploy_emails_worker:
description: Deploy emails-worker service?
required: true
type: boolean
deploy_script_executor:
description: Deploy script-executor service?
required: true
Expand Down Expand Up @@ -145,6 +149,27 @@ jobs:
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

build-and-push-emails-worker:
runs-on: ubuntu-latest
if: ${{ inputs.deploy_emails_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: emails-worker

- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

build-and-push-script-executor:
runs-on: ubuntu-latest
if: ${{ inputs.deploy_script_executor }}
Expand Down Expand Up @@ -256,6 +281,24 @@ jobs:
image: ${{ needs.build-and-push-automations-worker.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}

deploy-emails-worker:
needs: build-and-push-emails-worker
runs-on: ubuntu-latest
if: ${{ inputs.deploy_emails_worker }}
defaults:
run:
shell: bash

steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/deploy-service
with:
service: emails-worker
image: ${{ needs.build-and-push-emails-worker.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}

deploy-script-executor:
needs: build-and-push-script-executor
runs-on: ubuntu-latest
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/lf-staging-deploy-emails-worker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: LF Staging Deploy Emails Worker

on:
push:
branches:
- 'lf-staging/**'
- 'lf-staging-**'
paths:
- 'services/libs/**'
- 'services/apps/emails_worker/**'

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
CROWD_CLUSTER: ${{ secrets.LF_STAGING_CLUSTER_NAME }}
CROWD_ROLE_ARN: ${{ secrets.LF_STAGING_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-staging
SLACK_WEBHOOK: ${{ secrets.LF_STAGING_SLACK_CHANNEL_HOOK }}

jobs:
build-and-push:
runs-on: ubuntu-latest
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: emails-worker

- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

deploy-emails-worker:
needs: build-and-push
runs-on: ubuntu-latest
defaults:
run:
shell: bash

steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/deploy-service
with:
service: emails-worker
image: ${{ needs.build-and-push.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}
43 changes: 43 additions & 0 deletions .github/workflows/production-deploy-new.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
description: Deploy automations-worker service?
required: true
type: boolean
deploy_emails_worker:
description: Deploy emails-worker service?
required: true
type: boolean
deploy_script_executor:
description: Deploy script-executor service?
required: true
Expand Down Expand Up @@ -145,6 +149,27 @@ jobs:
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

build-and-push-emails-worker:
runs-on: ubuntu-latest
if: ${{ inputs.deploy_emails_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: emails-worker

- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

build-and-push-script-executor:
runs-on: ubuntu-latest
if: ${{ inputs.deploy_script_executor }}
Expand Down Expand Up @@ -256,6 +281,24 @@ jobs:
image: ${{ needs.build-and-push-automations-worker.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}

deploy-emails-worker:
needs: build-and-push-emails-worker
runs-on: ubuntu-latest
if: ${{ inputs.deploy_emails_worker }}
defaults:
run:
shell: bash

steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/deploy-service
with:
service: emails-worker
image: ${{ needs.build-and-push-emails-worker.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}

deploy-script-executor:
needs: build-and-push-script-executor
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-deploy-automations-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- 'staging-**'
paths:
- 'services/libs/**'
- 'services/apps/automations-worker/**'
- 'services/apps/automations_worker/**'

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/staging-deploy-emails-worker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Staging Deploy Emails Worker

on:
push:
branches:
- 'staging/**'
- 'staging-**'
paths:
- 'services/libs/**'
- 'services/apps/emails_worker/**'

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
CROWD_CLUSTER: ${{ secrets.STAGING_CLUSTER_NAME }}
CROWD_ROLE_ARN: ${{ secrets.STAGING_CLUSTER_ROLE_ARN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
SLACK_CHANNEL: deploys-staging
SLACK_WEBHOOK: ${{ secrets.STAGING_SLACK_CHANNEL_HOOK }}

jobs:
build-and-push:
runs-on: ubuntu-latest
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: emails-worker

- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

deploy-emails-worker:
needs: build-and-push
runs-on: ubuntu-latest
defaults:
run:
shell: bash

steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/deploy-service
with:
service: emails-worker
image: ${{ needs.build-and-push.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}
2 changes: 2 additions & 0 deletions backend/.env.dist.local
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ CROWD_ANALYTICS_API_TOKEN=
# Temporal
CROWD_TEMPORAL_SERVER_URL=localhost:7233
CROWD_TEMPORAL_NAMESPACE=default
CROWD_TEMPORAL_ENCRYPTION_KEY_ID=local
CROWD_TEMPORAL_ENCRYPTION_KEY=FweBMRnGCLshER8FlSvNusQA6G3MRUKt

# Seach sync api
CROWD_SEARCH_SYNC_API_URL=http://search-sync-api:8083
2 changes: 2 additions & 0 deletions backend/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ CROWD_SQS_PORT=9325

# Temporal settings
CROWD_TEMPORAL_SERVER_URL=localhost:7234
CROWD_TEMPORAL_ENCRYPTION_KEY_ID=test
CROWD_TEMPORAL_ENCRYPTION_KEY=dXfA98nyNcIuvW1RZecqEIREKgDMnGjF
Loading

0 comments on commit 8f9871e

Please sign in to comment.