-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (58 loc) · 1.98 KB
/
products_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
name: products_pipeline
on:
push:
paths:
- 'src/products/**'
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:
if: startsWith(github.event.ref, 'refs/heads/main')
uses: ./.github/workflows/pipeline_template.yaml
needs: [run_unit_tests]
with:
sam_deploy_overrides: "StageName=development"
stack_name: ${{ vars.PRODUCTS_STACK_NAME }}-development
sam_template: src/products/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:
sam_deploy_overrides: "StageName=uat LogLevel=DEBUG"
stack_name: ${{ vars.PRODUCTS_STACK_NAME }}-uat
sam_template: src/products/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 }}