Azure Git repos provide protection to branches with branch policies. The cross-repo branch policy in a team project now lets you define policies applicable to a branch pattern, where it would even be applied to future branches which are adhering to the specified pattern. Let’s explore this feature in bit of detail.
In the team project settings page, now you get all repositories policies tab, where you can define branch policies effective to all repos in the team project.
You can apply policy to protect default branch in each repo. Or you can define a pattern, which will protect the current and future branches matching the pattern. Currently available branches matching the pattern in each repo in the team project will be listed as you type in the pattern.
Then you can create the branch policy for the given pattern as normal branch protection policy in Azure Git repo. Which can even include reviewers, build policies etc.
The policies will be applied to any branch meeting the pattern in any repo in the team project.
This feature is really useful when you have a single repo in a team project to auto apply the policies. Multiple repos in single project get the policies applied but the build policies have to be controlled with path filters in project level using cross project policies, or use inherited policies combined with individual repo branch level build policies. However, that will require the build policies to be applied to each new branch created.
Ideally, a feature to apply pattern based policies to single repo within a team project, with the option to decide cross repo policy inheritance to be overridden would be greatly benefiting the maintenance of branch protection policies in Azure Git repos.
Wednesday, 8 July 2020
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Dynamic block allows to create nested multi level block structures in terraform code. Conditional usage of such blocks are really useful in...
-
In Azure DevOps YAML pipelines there are several functions available for you to use. replace is such a useful function, which you can use t...
-
We have discueed, that we have to use an environment variable to handle input parameter default values, if we are using trigger for workflo...
-
Adding Azure Container Registry (ACR) service connection to Azure DevOps is really simple as described in " Create Service Connection ...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...
No comments:
Post a Comment