Skip to content

Commit

Permalink
Adding prod stage to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
enrique committed Jun 19, 2024
1 parent f71e874 commit 13775c9
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/clients_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,19 @@ jobs:
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:
sam_deploy_overrides: "StageName=prod LogLevel=DEBUG"
stack_name: ${{ vars.CLIENTS_STACK_NAME }}-prod
sam_template: src/clients/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 }}
16 changes: 16 additions & 0 deletions .github/workflows/orders_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,19 @@ jobs:
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 }}
16 changes: 16 additions & 0 deletions .github/workflows/products_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,19 @@ jobs:
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:
sam_deploy_overrides: "StageName=prod LogLevel=DEBUG"
stack_name: ${{ vars.PRODUCTS_STACK_NAME }}-prod
sam_template: src/products/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 }}
16 changes: 15 additions & 1 deletion .github/workflows/users_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,18 @@ jobs:
stage_name: uat
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_HUAT }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_HUAT }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_HUAT }}
prod:
uses: ./.github/workflows/pipeline_template.yaml
needs: [uat]
with:
stack_name: ${{ vars.USERS_STACK_NAME }}-prod
sam_template: src/users/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 }}

0 comments on commit 13775c9

Please sign in to comment.