Skip to content

Commit

Permalink
Adding clients CICD pipeline (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
enrique-ayala authored May 21, 2024
1 parent b252e53 commit 3c03f64
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/clients_pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: clients_pipeline

on:
push:
paths:
- 'src/clients/**'
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.CLIENTS_STACK_NAME }}-development
sam_template: src/clients/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.CLIENTS_STACK_NAME }}-uat
sam_template: src/clients/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 }}

0 comments on commit 3c03f64

Please sign in to comment.