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
412 stars 201 forks source link

[Feature] Support generating a service specific GitHub Actions build and deploy workflow #1892

Closed sabbour closed 1 year ago

sabbour commented 1 year ago

The azd templates force a monorepo structure. It would be nice to have something like azd pipeline generate --service=frontend --provider=github that will automatically create a GitHub Actions pipeline that is filtered to trigger on the frontend service root folder. The pipeline should follow the best practices outline in the example here https://github.com/wbreza/todo-nodejs-mongo-aks/blob/main/.github/workflows/azure-dev.yml

vhvb1989 commented 1 year ago

The azd templates force a monorepo structure

You might be referring to the todo templates from Azure-Samples.
Templates are a quick way to start your app. But once you init the project, you can change the pipeline definitions, or add more workflows, more apps, etc. You don't need to keep the pipeline definition as it is within the initial template.

Have you looked awesome azd. There are more templates there to explore. Some of those templates have update the initial definition for the github actions, like this one: https://github.com/Azure-Samples/app-service-javascript-sap-cloud-sdk-quickstart/blob/main/.github/workflows/azure-dev.yml#L4

So, it is basically up to the template's author to define what is the expectation. The toto templates are mostly used for demos where the expected result of azd pipeline config is to call provision and deploy from the workflow.

I've seen other templates where folks have updated the workflow definition to only call provision when there are changes to the /infra folder. That's another example of what it can be done.