I added the stages:
to main pipeline and moved the job templates inside stage:
statements. Added DependsOn to stage:
.
This changes in pipeline.yaml file avoided change in azure-build.yaml file and solved my purpose to add dependency between two jobs.
e.g.
Pipeline.yaml
stages:
- stage: 'build'
jobs:
- template: azure-build.yaml@templates
parameters:
...
- stage: 'test'
dependsOn: 'build'
jobs:
- template: azure-test.yaml@templates
parameters:
...