小编Sar*_*Sar的帖子

默认取消选择阶段

在 Azure Devops 多级 YAML 管道中,我们有多个环境。在正常运行的阶段,我们只在 QA 中进行构建和部署,因此我们需要手动取消选择每个阶段。默认情况下,所有阶段都被选中是否有可能完全相反,默认情况下所有阶段都被取消选择???

选择阶段

trigger: none
pr: none
stages:
- stage: 'Build'
  jobs:
  - deployment: 'Build'
    pool:
      name: Default
# testing
    environment: INT
    strategy:
      runOnce:
        deploy:
          steps:
          - checkout: none
          - powershell: |
              echo "Hello Testing"
              Start-Sleep -Seconds 10
- stage: 'Sandbox'
  jobs:
  - job: 'Sandbox'
    pool:
      name: Default
    steps:
    - checkout: none
# testing
    - powershell: |
        echo "Hello Testing"
- stage: 'Test'
  jobs:
  - job: 'DEV'
    pool:
      name: Default
    steps:
    - checkout: none
    - …
Run Code Online (Sandbox Code Playgroud)

yaml azure-devops

6
推荐指数
1
解决办法
743
查看次数

Pull Request 构建并跳过其他阶段

我在 Azure DevOps 中使用多阶段 YAML 管道,并且在一个阶段中构建并将工件部署到其他阶段。我已经设置了拉取请求构建,每当推送新代码时,管道中的所有阶段都会运行,这是不可取的。

我想要的是,每当新代码被推送到任何分支时,我想要运行构建阶段并跳过部署阶段。默认情况下,此选项在经典管道中可用,因为构建和发布是早期的单独组件

azure-devops azure-pipelines

3
推荐指数
1
解决办法
2393
查看次数

多级 YAML 管道具有独立的阶段,无需依赖项

在 Azure DevOps 中,我使用多阶段 YAML 管道进行构建和部署。屏幕截图显示了当前的管道设置。我希望单独拥有 sandbox1 而不依赖于 Build。

trigger: none
pr: none
stages:
- stage: 'Build'
  jobs:
  - job: 'Build'
    pool:
      vmImage: ubuntu-16.04
    steps:
    - checkout: none
    - powershell: |
        echo "Hello Testing"
- stage: 'Sandbox'
  jobs:
  - job: 'Sandbox'
    pool:
      vmImage: ubuntu-16.04
    steps:
    - checkout: none
    - powershell: |
        echo "Hello Testing"
- stage: 'DEV'
  jobs:
  - job: 'DEV'
    pool:
      vmImage: ubuntu-16.04
    steps:
    - checkout: none
    - powershell: |
        echo "Hello Testing"
- stage: 'QA'
  dependsOn: ['DEV','DEV1']
  jobs: …
Run Code Online (Sandbox Code Playgroud)

azure-devops azure-pipelines

0
推荐指数
1
解决办法
1001
查看次数

标签 统计

azure-devops ×3

azure-pipelines ×2

yaml ×1