You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Pipeline触发器未触发,如何默认指定目标分支运行流水线

解决Pipeline默认分支与触发器问题

核心问题分析

流水线未触发且报错找不到yml文件,是因为默认从master分支拉取配置,但你的azure-pipelines.yml实际在feat-regression-test分支,同时手动运行时默认分支未指定为目标分支。

解决方案

1. 设置流水线默认分支(关键)

  • 打开对应流水线,点击右上角「编辑」
  • 点击顶部工具栏的「...」,选择「触发器」
  • 切换到「YAML」选项卡,在「默认分支用于手动和计划构建」下拉列表中选择feat-regression-test
  • 保存设置,之后手动运行或计划构建都会默认从该分支加载yml配置

2. 确认触发器配置有效性

你当前的yaml触发器配置是正确的:

trigger:
- feat-regression-test

pool:
  vmImage: 'ubuntu-latest'

steps:
- task: UseRubyVersion@0
  inputs:
    versionSpec: '>= 2.5'

- script: |
    gem install bundler
    bundle install --retry=3 --jobs=4
  displayName: 'bundle install'

- script: bundle exec cucumber -t @incluir_setor_resp_em_branco
  displayName: 'bundle exec cucumber'


- task: PublishTestResults@2
  inputs:
    testResultsFormat: 'NUnit'
    testResultsFiles: '**/TEST-*.xml'
    mergeTestResults: true
    searchFolder: '$(Common.TestResultsDirectory)'
    testRunTitle: 'Regression Test Geocall Gab'

该配置会在feat-regression-test分支有代码提交时自动触发流水线,无需额外修改。

3. 手动运行临时方案

若需临时手动运行,点击「运行流水线」后,在分支选择弹窗中直接选择feat-regression-test分支再执行即可。

内容的提问来源于stack exchange,提问作者jana kilua

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.23 08:09:24