【发布时间】:2020-07-27 12:58:01
【问题描述】:
我有以下回购结构:
/
/dir1
/file
/dir2
/file
是否可以构建 Azure DevOps 条件以在 ./dir1/file 更改时执行特定作业,而在 ./dir2/file 更改时执行其他作业?
【问题讨论】:
标签: azure-devops
我有以下回购结构:
/
/dir1
/file
/dir2
/file
是否可以构建 Azure DevOps 条件以在 ./dir1/file 更改时执行特定作业,而在 ./dir2/file 更改时执行其他作业?
【问题讨论】:
标签: azure-devops
据我所知,这对于特定的工作来说是不可能的。文档只解释了如何为整个管道完成。
此处以作业的语法为例,没有触发选项,您将不会在此处找到触发选项:
- job: string # name of the job, A-Z, a-z, 0-9, and underscore
displayName: string # friendly name to display in the UI
dependsOn: string | [ string ]
condition: string
strategy:
parallel: # parallel strategy
matrix: # matrix strategy
maxParallel: number # maximum number simultaneous matrix legs to run
# note: `parallel` and `matrix` are mutually exclusive
# you may specify one or the other; including both is an error
# `maxParallel` is only valid with `matrix`
continueOnError: boolean # 'true' if future jobs should run even if this job fails; defaults to 'false'
pool: pool # see pool schema
workspace:
clean: outputs | resources | all # what to clean up before the job runs
container: containerReference # container to run this job inside
timeoutInMinutes: number # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: number # how much time to give 'run always even if cancelled tasks' before killing them
variables: { string: string } | [ variable | variableReference ]
steps: [ script | bash | pwsh | powershell | checkout | task | templateReference ]
services: { string: string | container } # container resources to run as a service container
这里是documentatiom 工作。
【讨论】:
我们有相同的场景,但我们不能使用单独的管道,因为 gatekeepers 必须为不同的管道(API、DB、UI 等)多次批准同一个版本。 )
我们使用找到的解决方案解决了它here
【讨论】: