Hello,
I recently tried to set the `$BITBUCKET_BRANCH` default variable for the deployment key in my yaml. I got an error when the pipeline ran stating:
"The environment '$BITBUCKET_BRANCH' in your bitbucket-pipelines.yml doesn’t match any environment defined in your settings. Either update your yml, or your settings, to use the same name."
Here's an example of what I'm talking about:
- step: &terraform_update
image: name: <image>
name: Update Terraform
deployment: $BITBUCKET_BRANCH
script:
- do stuff
I have deployment variables set for each environment. Do deployment variables override default variables like $BITBUCKET_BRANCH even if they're not overwritten in the deployment variables?
@Jason Ausmus Bitbucket Pipelines doesn't support using variables as key for deployment, you will have to statically define the deployment environment.
- step: &terraform_update
image: name: <image>
name: Update Terraform
deployment: prod-deploy
script:
- do stuff
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.