如何在master上添加自定义注释标记,一旦拉请求(PR)完成,自动
更多背景:
我们有一个存储库,保存Azure Devops管道模板("devops template repo“)其他repos有一个根管道文件引用"devops模板”repo
MAJOR上的引脚仅举一个例子:
resources:
repositories:
- repository: templates
type: git
name: template_devops_pipelines
ref: "refs/tags/v1"发布于 2021-04-03 06:37:54
我使用的一个示例标记管道:
trigger:
- main
variables:
user.email: "devops@myorganization.com"
user.name: "DevOps"
defaultBranch: "main"
major: 1
minor: 0
patch: $[counter(variables['patch'], 2)]
name: $(major).$(minor).$(patch)
steps:
- checkout: self
persistCredentials: true
- script: |
git config user.email ${{variables['user.email']}}
git config user.name ${{variables['user.name']}}
displayName: 'configure git credentials'
- script: |
git tag "$(Build.BuildNumber)"
git push origin "$(Build.BuildNumber)"
displayName: 'git tag'
condition: eq(variables['Build.SourceBranchName'], variables['defaultBranch'])你基本上需要三件事:
使用later
对于最后一步,您需要为管道生成服务帐户分配“贡献”权限。转到:Project Settings -> Repositiories -> {your repo} -> Security,查找用户{your organization} Build Service,并将贡献设置为Allow。
https://stackoverflow.com/questions/60540841
复制相似问题