I have a step defintion template, that I intend to use within build pipelines. The step definition's location is not under the same folder as the build pipeline itself.
During the validation of the pipeline, AzureDevops considers build pipeline's location as the root location. This is appended to the path of the reference
consider the following example of code hierarchy
azure
|----products
|----resource-type1
|----step-def.yaml
|----resource-type2
|----step-def.yaml
|----solutions
|----solution1
|----local-step-def.yaml
|----build.yaml
|----solution2
|----build.yaml
Following works when the build.yaml is as below
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
steps:
- template: solution1/local-step-def.yml
If you change the template reference as below, it does not work
- template: ../products/resource-type1/step-def.yml
When validation is done on the pipeline, azure-devops maps to
# <path-of-the-build-pipeline>/<template-ref>
azure/solutions/solution1/<template-reference>
Here is the documentation, https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#step-re-use
So how can I map to the step-def.yaml file that lives in the products folder hierarchy?