Azure devops 源路径上的Azure DevOps条件

Azure devops 源路径上的Azure DevOps条件,azure-devops,Azure Devops,我拥有以下回购结构: / /dir1 /file /dir2 /file 是否可以构建Azure DevOps条件以在./dir1/文件更改时执行特定作业,并在./dir2/文件更改时执行其他作业 据我所知,这对于分词工作是不可能的。文档仅说明如何对整个管道执行此操作 这里是作业的实例语法,没有触发器选项,您在这里找不到触发器选项: - job: string # name of the job, A-Z, a-z, 0-9, and underscore dis

我拥有以下回购结构:

/
  /dir1
    /file
  /dir2
    /file

是否可以构建Azure DevOps条件以在./dir1/文件更改时执行特定作业,并在./dir2/文件更改时执行其他作业

据我所知,这对于分词工作是不可能的。文档仅说明如何对整个管道执行此操作

这里是作业的实例语法,没有触发器选项,您在这里找不到触发器选项:

- 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

这是找工作的。

据我所知,这是不可能的。文档仅说明如何对整个管道执行此操作

这里是作业的实例语法,没有触发器选项,您在这里找不到触发器选项:

- 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

这是作业。我们确实有一个条件来控制作业是否应该运行。但它不是基于路径过滤器

您可以指定每个作业运行的条件。默认情况下,如果作业不依赖于任何其他作业,或者如果所有作业都依赖于其他作业,则作业将运行 它所依赖的工作中有许多已经完成并成功。你可以 通过强制运行作业来自定义此行为,即使以前的作业 失败或指定自定义条件

您不必根据源路径运行作业。作为一种解决方法,您可以创建两个管道来分离作业,并在触发器中确定使用路径筛选器时将运行的管道:

在“触发器”选项卡上,有一个选项可以指定要生成的项目的源路径。指定源路径后,只有包含与包含/排除规则匹配的修改的提交才会触发生成


我们确实有一个条件来控制作业是否应该运行。但它不是基于路径过滤器

您可以指定每个作业运行的条件。默认情况下,如果作业不依赖于任何其他作业,或者如果所有作业都依赖于其他作业,则作业将运行 它所依赖的工作中有许多已经完成并成功。你可以 通过强制运行作业来自定义此行为,即使以前的作业 失败或指定自定义条件

您不必根据源路径运行作业。作为一种解决方法,您可以创建两个管道来分离作业,并在触发器中确定使用路径筛选器时将运行的管道:

在“触发器”选项卡上,有一个选项可以指定要生成的项目的源路径。指定源路径后,只有包含与包含/排除规则匹配的修改的提交才会触发生成


我们有相同的场景,但我们不能使用单独的管道,因为这将不得不为不同的管道API、DB、UI等多次批准同一版本


我们使用我们发现的解决方案解决了这个问题,我们有相同的场景,但我们不能使用单独的管道,因为这将不得不多次批准不同管道API、DB、UI等的同一版本

我们用找到的解决方案解决了这个问题