1

In azure-pipelines one can use dependsOn to indicate what jobs or deployments should be completed before another job will be started.

At the moment, the dependsOn array of the final job has to be added everytime if some job is added.

The question is whether it is possible to define a sort of before expression to ensure that this only has to be defined once in a azure-pipeline template.

030
  • 13,235
  • 16
  • 74
  • 173

1 Answers1

2

No, there's no such thing as a 'before' setting or anything like it.

There are only two ways of configuring job dependencies:

  1. don't define dependsOn at all: this is an easy way to let the pipeline run the jobs one after another, but doesn't let you use advanced features
  2. define dependsOn for each job: this is more complicated (as you've found out) but allows fine-grained control and extra features such as reusing output variables
Vince Bowdren
  • 250
  • 1
  • 7