Hi Team,
By default, it is taking the region of one environment as an example. we have environments such as Dev, Qa, Stage. However, when deploying, it is automaticallytaking the stage region for the Dev deployment. please find the below pipeline.
- step:
name: Build and Push Docker Image to the DEV ECR
image: atlassian/pipelines-awscli
- pipe: atlassian/aws-ecr-push-image:2.2.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID_DEV
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY_DEV
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION_DEV
- step:
name: Build and Push Docker Image to the STAGE ECR
image: atlassian/pipelines-awscli
- pipe: atlassian/aws-ecr-push-image:2.2.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID_STAGE
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY_STAGE
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION_STAGE
- step:
name: Build and Push Docker Image to the QA ECR
image: atlassian/pipelines-awscli
- pipe: atlassian/aws-ecr-push-image:2.2.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID_QA
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY_QA
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION_QA