-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (73 loc) · 2.8 KB
/
orders_pipeline.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
name: orders_pipeline
on:
push:
paths:
- 'src/orders/**'
branches:
- 'main'
- 'feature*'
workflow_dispatch:
jobs:
run_unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
make install
working-directory: ./tests
- name: Run tests
run: |
make test
working-directory: ./tests
development:
uses: ./.github/workflows/pipeline_template.yaml
needs: [run_unit_tests]
with:
stack_name: ${{ vars.ORDERS_STACK_NAME }}-development
sam_deploy_overrides: "ShopifyEventBusName=${{ vars.SHOPIFY_EVENT_BUS_NAME_DEV }} StageName=development LogLevel=DEBUG"
sam_template: src/orders/template.yaml
aws_region: us-east-1
pipeline_execution_role: ${{ vars.PIPELINE_EXECUTION_ROLE_DEV }}
cloudformation_execution_role: ${{ vars.CLOUDFORMATION_EXECUTION_ROLE_DEV }}
artifacts_bucket: ${{ vars.ARTIFACTS_BUCKET_DEV }}
stage_name: development
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_MBU }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_MBU }}
uat:
if: startsWith(github.event.ref, 'refs/heads/main')
uses: ./.github/workflows/pipeline_template.yaml
needs: [development]
with:
stack_name: ${{ vars.ORDERS_STACK_NAME }}-uat
sam_deploy_overrides: "ShopifyEventBusName=${{ vars.SHOPIFY_EVENT_BUS_NAME_UAT }} StageName=uat LogLevel=DEBUG"
sam_template: src/orders/template.yaml
aws_region: us-east-1
pipeline_execution_role: ${{ vars.PIPELINE_EXECUTION_ROLE_UAT }}
cloudformation_execution_role: ${{ vars.CLOUDFORMATION_EXECUTION_ROLE_UAT }}
artifacts_bucket: ${{ vars.ARTIFACTS_BUCKET_UAT }}
stage_name: uat
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_HUAT }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_HUAT }}
prod:
if: startsWith(github.event.ref, 'refs/heads/main')
uses: ./.github/workflows/pipeline_template.yaml
needs: [uat]
with:
stack_name: ${{ vars.ORDERS_STACK_NAME }}-prod
sam_deploy_overrides: "ShopifyEventBusName=${{ vars.SHOPIFY_EVENT_BUS_NAME_PROD }} StageName=prod LogLevel=DEBUG"
sam_template: src/orders/template.yaml
aws_region: us-east-1
pipeline_execution_role: ${{ vars.PIPELINE_EXECUTION_ROLE_PROD }}
cloudformation_execution_role: ${{ vars.CLOUDFORMATION_EXECUTION_ROLE_PROD }}
artifacts_bucket: ${{ vars.ARTIFACTS_BUCKET_PROD }}
stage_name: prod
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_HPROD }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_HPROD }}