我们有一个用例,我们的代码完全托管在 Azure DevOps 中(管道、存储库等)。我们需要构建和部署“完整”构建/部署流程来部署无服务器功能。我们理想的情况是在 PR 打开和更新时有一个单一的构建/部署过程。Individual CI我们有一个构建验证策略,当 PR 接受另一个策略时,我们希望忽略该构建push,因为Build Validation策略应该取代该trigger块。
pr由于Azure Repos 无法使用触发器,有没有办法实现此目的?
存储库类型:Azure 存储库 Git
# The pipeline will fail if a branch is not either 'main' or 'something/12345-something'
trigger:
paths:
exclude:
- azure-pipelines-cleanup.yaml
- docs
- README.md
name: $(SourceBranchName).$(Rev:r)_$(Build.RequestedFor)
resources:
repositories:
- repository: pipeline
type: git
name: <Org Obscured>/infra-pipeline
ref: feature/212242-pipeline-housecleaning # this is pipeline branch ref, should be main unless testing pipeline changes
# This extends a template …Run Code Online (Sandbox Code Playgroud)