In this example, I know the destination environment from $BITBUCKET_BRANCH in my step set-deployment-environment. I set my environment variable $ENV_NAME, but deployment will not accept an environment variable as I believe this needs to be a string.
pull-requests:
release/*:
- step: *set-deployment-environment
- step:
<<: *ansible-build-deploy
name: Deploying to environment
deployment: $ENV_NAME
Can anyone suggest a solution?