Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you change the location of azure-pipelines.yaml in Azure Devops?

Is it possible to configure an Azure DevOps pipeline to look for the azure-pipelines.yaml file in a custom location?

We're using a mono-repo source control architecture for our current work with different packages held under packages/<package-name> and only one of them needs an Azure DevOps pipeline, so ideally we'd like to have the YAML configuration stored with the package rather than at the root of the repo, but I can't find any options for this in the DevOps portal. This is definitely configurable in other similar services like AWS CodeBuild.

like image 253
Henry Wilson Avatar asked Apr 10 '19 13:04

Henry Wilson


People also ask

Where do you store Azure pipelines Yml?

Usually, this file is named azure-pipelines. yml and is located at the root of your repo. Navigate to the Pipelines page in Azure Pipelines, select the pipeline you created, and choose Edit in the context menu of the pipeline to open the YAML editor for the pipeline.

How do I change Azure pipelines Yml?

Edit a YAML pipelineSign in to your organization ( https://dev.azure.com/{yourorganization} ). Select your project, choose Pipelines > Pipelines, and then select the pipeline you want to edit. Choose Edit. Make edits to your pipeline using Intellisense keyboard shortcuts and the task assistant for guidance.


2 Answers

yes you can do that, when creating the build use old UI wizard, if you already have a build in place, you can open its settings>variables (or triggers) and then navigate to the YAML section and under YAML file path you can change it

click the ... on the build edit page next to the Run button:

enter image description here

like image 199
4c74356b41 Avatar answered Sep 19 '22 21:09

4c74356b41


The YAML file from a subfolder may be chosen on the third step of pipeline creation wizard.

enter image description here

like image 24
Monsignor Avatar answered Sep 23 '22 21:09

Monsignor