在YAML中以15分钟为批处理批次进行构建

时间:2019-02-23 10:45:55

标签: azure-devops azure-devops-extensions schema.yml

我要在Azure Devops(早期的VSTS)中创建一个构建管道,并且希望每15分钟在BATCH中触发一次构建。如果回购中未收到任何合并,则不应创建任何构建。

下面是我指的

trigger:
    batch: boolean # batch changes if true, start a new build for every push if false
branches:
    include: [ string ] # branch names which will trigger a build
    exclude: [ string ] # branch names which will not
paths:
    include: [ string ] # file paths which must match to trigger a build
    exclude: [ string ] # file paths which will not trigger a build code here

我摘自https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema的此代码段

trigger:
    batch: true
branches:
    include:
    - master

pool:
  vmImage: 'Ubuntu-16.04'

variables:
  buildConfiguration: 'Release'

steps:
- script: dotnet build --configuration $(buildConfiguration)
  displayName: 'dotnet build $(buildConfiguration)'
  1. 仅当我现在收到当前回购中的合并,那么接下来的15分钟内当前回购中的所有其余合并将是同一版本的一部分。如何在我的YAML文档中添加15分钟的详细信息?

  2. 当前构建完成后,直到在回购中收到下一个合并,是否应该在15分钟的时间内开始?如何在我的YAML文档中进行编码?

0 个答案:

没有答案