-
Notifications
You must be signed in to change notification settings - Fork 5
79 lines (72 loc) · 2.81 KB
/
account-data-deleter.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
name: Account Data Deleter
on:
# Only run the tests for this service when any of the following file paths change
pull_request:
paths:
- 'infrastructure/account-data-deleter/**'
- 'packages/**'
- 'servers/account-data-deleter/**'
- 'lambdas/account-data-deleter-batch-delete/**'
- 'lambdas/account-data-deleter-events/**'
- 'pnpm-lock.yaml'
- '.github/actions/**'
- '.github/workflows/account-data-deleter.yml'
- '.github/workflows/reuse-*.yml'
push:
branches:
- main
- dev
jobs:
# Let's test the service against some real life and mocked docker services.
test-integrations:
# Only run this job on a pull request event
if: github.event_name == 'pull_request'
# Use our re-usable test integrations workflow which will use our docker compose file
uses: ./.github/workflows/reuse-test-integrations.yml
with:
# Only run the tests for our service
scope: account-data-deleter
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
# It's infrastructure time, run the infrastructure update commands
infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: account-data-deleter-cdk
stack-output-path: infrastructure/account-data-deleter/cdktf.out/stacks/account-data-deleter
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
# Let's try building and conidtionally pushing our docker image to the necessary account.
build-and-push-image:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: account-data-deleter
app-path: servers/account-data-deleter
app-port: 4015
sentry-project: account-data-deleter
docker-repo-name-pattern: accountdatadeleter-{0}-app
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
build-and-push-lambda-events:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
#needs: [infrastructure]
with:
scope: account-data-deleter-events
sentry-project: account-data-deleter
s3-bucket-pattern: pocket-accountdatadeleter-{0}-sqs-event-consumer
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
build-and-push-lambda-batch-delete:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
#needs: [infrastructure]
with:
scope: account-data-deleter-batch-delete
sentry-project: account-data-deleter
s3-bucket-pattern: pocket-accountdatadeleter-{0}-batchdeletelambda
# Ensure the re-usable workflow is allowed to access the secrets
secrets: inherit
# deploy:
# needs: [infrastructure]
# with:
# terraform-output: ${{ needs.infrastructure.outputs.terraform-output }}