在 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) 我在 Azure DevOps 中使用多阶段 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)