I have a deployment pipeline I'm trying to configure, and within the pipeline I have multiple deployment steps for various parts of the staging environment.
I have configured the repository settings to group these deployments under Staging:
"Staging-step-1"
"Staging-step-2"
In my pipeline, I've configured some variables at the Repository level, and some additional Deployment specific variables at the Staging level. However, when I try and run the pipeline, the Staging Deployment variables are empty. Here's an example step:
- step:
name: Build and deploy Lambda image on Staging
deployment: Staging-step-1
trigger: manual
size: 2x
services:
- docker
script:
- echo "Building container image"
- docker build --build-arg SHA=$BITBUCKET_COMMIT -t $MY_IMAGE_NAME .
- pipe: atlassian/aws-ecr-push-image:1.4.2
variables:
IMAGE_NAME: ${MY_IMAGE_NAME}
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
- pipe: atlassian/aws-lambda-deploy:1.1.0
variables:
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
FUNCTION_NAME: ${MY_FUNCTION_NAME}
COMMAND: 'update'
IMAGE_URI: '${AWS_ACCOUNT_ID}.dkr.ecr.eu-west-2.amazonaws.com/${MY_IMAGE_NAME}:latest'
In the above, all of the AWS variables are defined for the Repository, and they are set correctly. The rest of the variables (eg. MY_IMAGE_NAME) are set at the Staging Deployment level, and they come in blank.
What am I missing here?