Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
393 stars 187 forks source link

[Feature request] Allow .azuredevops as well as .azdo folders #4034

Closed rick-roche closed 2 weeks ago

rick-roche commented 2 months ago

Currently, azd looks for the azure-dev.yml file in either:

The ability to use Azure DevOps pull request templates supports placing a template in the following directories - .azuredevops, .vsts, docs or the root of the repository.

As a result, we've implemented the convention of using .azuredevops as the directory where all our azdo components live. It would be great to be able to use either .azdo or .azuredevops directories with azd.

My proposal is to allow azd to be able to look for azure-dev.yml in either .azdo/pipelines/azure-dev.yml or .azuredevops/pipelines/azure-dev.yml folders when using Azure DevOps.

johnnyreilly commented 1 month ago

+1 from me. A convention has grown up in many places (and, if memory serves, it originally grew out of how Microsoft would structure public Azure DevOps repos) of having the .azuredevops folder being the main folder for all things Azure DevOps related in the repo. The equivalent of .github if you will. I've noticed that an alternative convention of using .azdo is has become more common recently; and it looks like azd is embracing that.

It would be awesome if it supported .azuredevops as well as .azdo. Speaking for the organisation I work in, we could all move to use .azdo but it would be a slightly painful migration, given the retargeting of pipeline files / build validations etc. Totally doable of course, but frankly a real chore.

Would love to see .azuredevops support in azd - as much as anything else, because it feels like a missing piece rather than a brand new feature. (I say this given the built-in support for .azuredevops in the Azure DevOps platform itself.)

jongio commented 4 weeks ago

@rick-roche @johnnyreilly - Can you please try the build from this PR and validate if it meets your needs? And if not, can you add comments to that PR? https://github.com/Azure/azure-dev/pull/4190

johnnyreilly commented 4 weeks ago

Oh wow - thanks for taking a look at this! Apropos of nothing, I'm indebted to you elsewhere @jongio - you power the Auth that I use to ship my Azure Static Web Apps backed blog and even get a shout out in the README 😅

I'm away on holiday right now but will be back in front of a computer next week - I can test then! From the looks of the PR we can just use:

curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4190/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4190/install-azd.sh | bash -s -- --base-url https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4190 --version '' --verbose --skip-verify

To test the PR build?

rick-roche commented 2 weeks ago

Hi @jongio , this is fantastic - thank you! This adds what I was hoping for and works as expected off the branch.