2
votes

My source code is on GitHub.
I have an Azure Devops pipeline set up to build and deploy the application to an Azure subscription.
I also have the full azure environment defined in ARM templates.

I'd like to run the template deployment only when a specific folder changes in my GitHub repo.

Path triggers are only for Azure Devops repos.

Other possible solutions I investigated, but there is no clear documentation on how to achieve this exactly:

  • Custom condition on build or release task.
  • Pre-deployment conditions. Maybe artifact filters?
  • Pre-deployment Gates?

The ARM template deployment is idempotent, I know, but it takes a several long minutes to run even if there was no infrastructure change and I'd like to avoid that time wasted on every build.

1

1 Answers

0
votes

Sounds like you have a single pipeline for both the infrastructure and application code. I have separate pipelines for each, one for infrastructure as code and other builds/pipelines for applications, NuGet package creation, etc. Perhaps split the pipeline and have the application deployment trigger after and separately from the infrastructure deployment pipeline. That way the application build and deployment can run in a more frequent cycle.