-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: Pipelines - Deployments
-
None
-
1
Issue Summary
In Bitbucket Pipeline under Deployment Environment if you enable setting : Only allow admins to deploy to this environment and use any of the Access Tokens with admin scope to trigger the pipeline you will get below error.
This pipeline was halted because <TOKEN-Name> tried to deploy, but only an admin can deploy to Staging.
Steps to Reproduce
- Under Deployment Environment enable : Only allow admins to deploy to this environment
- Create a WAT or PAT or RAT with below scope :
pipeline:write repository:admin
Expected Results
It should trigger the build on deployment environment.
Actual Results
The below exception is thrown in the pipeline UI.
This pipeline was halted because <TOKEN-Name> tried to deploy, but only an admin can deploy to Staging.
Workaround
Admin users from admin group is allowed. Access tokens is not treated as an admin user.