仅在部署时从分支机构获取最新版本

时间:2020-05-29 00:40:07

标签: azure-devops azure-pipelines

在使用定义为CI触发器和deployment的{​​{1}}作业时

resources.pipelines

resources: pipelines: - pipeline: thumbnailGenerator project: myServices source: thumbnail-generator CI trigger: branches: include: - master 作业将下载管道的最新版本(可能是PR),而不是从deployment下载最新版本。有没有一种方法可以使它在进行CI构建时仅下载特定分支?

我还没有探索过,但是我正在考虑这种行为,无论如何它总是会为所有管道进行最新的构建。

1 个答案:

答案 0 :(得分:0)

管道对象上有一个名为branch的属性

resources:
  pipelines:
    - pipeline: thumbnailGenerator
      project: myServices
      source: thumbnail-generator CI
      branch: master
      trigger:
        branches:
          include:
            - master