Azure DevOps管道阶段

时间:2020-10-06 17:53:41

标签: azure-devops azure-pipelines

我有一个设置,我想触发CI以对Bitbucket Cloud存储库的每个拉取请求为基础。在相同的设置中,我还有三个不同的阶段,当我们要构建人工制品以部署到我们的环境中时,我想手动触发。

我遇到的问题是,在我的构建中添加了阶段之后,拉动请求触发器没有触发。配置如下所示:

pr:
  branches:
    include:
    - '*'

pool:
  vmImage: 'macos-latest'

stages:
- stage: CI
  displayName: 'Continues build'
  jobs:
  - job: C1
    steps:
      - template: azure-pipelines-ios.yml
        parameters:
          environment: 'ci'
      - task: PublishBuildArtifacts@1
        
- stage: Test
  displayName: 'Building for Test'
  jobs:
  - job: T1
    steps:
      - template: azure-pipelines-ios.yml
        parameters:
          environment: 'test'
      - task: PublishBuildArtifacts@1

- stage: Stage
  displayName: 'Building for Stage'
  jobs:
  - job: S1
    steps:
      - template: azure-pipelines-ios.yml
        parameters:
          environment: 'stage'
      - task: PublishBuildArtifacts@1

我想在每个拉取请求上触发CI阶段构建。我该怎么办?

1 个答案:

答案 0 :(得分:2)

如果要跳过其他阶段,则应使用以下条件:

difference = 0
For col = 1 To maxcol
For row = 1 To maxrow
    colval1 = 0
    colcal2 = 0
    colval1 = Ws1.Cells(row, col)
    colval2 = Ws2.Cells(row, col)
        If WorksheetFunction.Round(colval1, 2) <> WorksheetFunction.Round(colval2, 2) Then
            difference = difference + 1
            Cells(row, col) = colval1 & "<>" & colval2
        End If
Next row
Next col