We have our environments named using the same terms as our branches so our bitbucket-pipelines.yml should be as simple as:
image: python:3.7
pipelines:
default:
- step:
name: deploy to $BITBUCKET_BRANCH
deployment: $BITBUCKET_BRANCH
script:
- deploy.py $BITBUCKET_BRANCH
When validating this yml, however, it appears that it's not possible to use a variable to define the 'deployment' environment as 'Environment names can use letters, spaces, numbers, underscores or hyphens'.
Is there a way to use an environment variable to define the deployment environment as per the example above?