gpt4 book ai didi

Azure 开发运营 : CI Pipeline executing after merge

转载 作者:行者123 更新时间:2023-12-02 23:15:30 25 4
gpt4 key购买 nike

我已经实现了一个管道,一旦创建拉取请求,它将构建和测试应用程序。它工作正常,但合并 PR 后它会再次运行,我只希望它在创建 PR 时运行。

Yaml 罚款如下:

trigger:
- development

pool:
vmImage: ubuntu-latest

variables:
buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 3.1.000'
inputs:
version: 3.1.x
- task: DotNetCoreCLI@2
displayName: 'Build the application'
inputs:
command: 'build'
projects: 'example.csproj'
configuration: 'Release'

- task: DotNetCoreCLI@2
displayName: 'Run unit tests'
inputs:
command: 'test'
projects: 'example.csproj'
configuration: 'Release'

最佳答案

kraego is right .

您必须删除管道中的trigger部分,并为该构建配置构建验证分支策略。

参见here .

关于Azure 开发运营 : CI Pipeline executing after merge,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69012580/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com