1
votes

Let say I have 2 Deployment Groups Named QC and Production, each one contains X number of servers. I also have a Release Pipeline with 2 stages QCStage,ProductionStage.

How can I set my permissions,on Deployment Group Level, so that users can't deploy to Production?

I can achieve this using "Pre-deployment approvals" on each stage but I have hundreds of Pipelines,
we can't be setting permissions for every stage for every pipeline

Update: This doesn't see to be supported on Azure DevOps,a new Feature Suggestion has been created: Prevent users from deploying to a Deployment group using Deployment Group Permissions (not on each Stage)

1

1 Answers

0
votes

How prevent users from deploying to a Deployment group

Answering this question at two different scope levels.

Scope 1:

Take a simple sample, there has 2 deployment groups in your project: QA and Product.

If what you want is some of users can deploy to QA but not Product, I'm afraid this hasn't been expanded into azure devops until now.

Now for azure devops service, we provide 3 permission level controlled: collection, project and object. Deployment group is the one which belong to object level permission. We haven't provided more granular permissions control, like setting permission on one specific deployment group at this scenario.


Scope 2:

Just restrict someone to deploy a release.

As you know, Deployment group are used for a release stage. In this scenario, in order to control who can/can't deploy a release, please use the release permissions. BUT, there has one disadvantage that it work only for manually initiated releases.

enter image description here

So, I'm afraid Approvals on release stage is another and better option for you to make use until now.