azure-pipelines - 从构建中排除分支(Azure Pipelines)
问题描述
我想从 Azure Pipelines 构建中排除分支。我不想在 Azure Web 平台的配置中指定这一点。相反,我想在azure-pipeline.yml
. 所以我做的是这样的:
trigger:
branches:
include:
- '*'
exclude:
- artifacts
strategy:
matrix:
ubuntu_16_04_gcc_8:
imageName: 'ubuntu-16.04'
CC: gcc-8
CXX: g++-8
the_name: 'Azure Pipelines'
windows_2019:
imageName: 'windows-2019'
the_name: 'Azure Pipelines'
pool:
vmImage: $(imageName)
name: $(the_name)
steps:
- script: git submodule update --init --recursive
displayName: "Init Git Submodules"
condition: succeeded()
- script: cmake -S . -B ./build/
displayName: "CMake: Create Project"
condition: succeeded()
# and some more steps here
预期的行为是没有为 branch 启动构建artifacts
。但实际上仍然会触发构建。我需要如何更改yml
以实现预期的行为?
解决方案
推荐阅读
- javascript - 我需要在加载另一个代码之前加载此代码
- php - 多对多关系时如何使用查询生成器选择数据?
- dart - 如何为按钮小部件创建一个类
- swift4 - Google Maps SDK - Swift 4 - markerInfoWindow 在底部不显示像箭头一样的弹出框
- javascript - 时间序列折线图不显示
- firebase - 给定一个 FCM 发件人 ID,任何人都可以向我们的服务器发送 msg 吗?
- python - 无法将文件读取为纯文本
- ios - 如何通过远程相机 API 在 a7iii/a7riii/a9 上获得对焦模式
- python - 使用 @classmethod 在 django 中创建对象以进行测试
- python - 如何将字典中的值与键列表匹配