It seems to me that it's possible to bypass branch restrictions as permission option for Bitbucket Pipelines:
I have configured the following deployment restrictions:
Environment name: Production
Branches allowed to deploy to Production: master
Bitbucket-pipelines looks like this:
branches:
master:
- step:
name: Deploy
deployment: production
script:
- echo "deploy"
This works as expected: I can only deploy my master branch to production and no other branches.
Now I create a branch in which I remove deployment: production from bitbucket-pipelines.
This makes it possible to run pipeline branches:master for this branch, as the branch restriction appears to be out of order.
Is this intended? Is there another way to make it impossible to run master / production pipelines for arbitrary branches?