0
votes

I use Azure DevOps with which I execute an Azure Pipeline bash script that deploys my ARM templates stored on Github.

Github repo structure:

- deploy.sh
- arm_templates_folder
    - storageacocunt.json
    - eventhub.json
    -etc...

How is it possible to only deploy templates that has been modified on Github since the last deployment?

For example, eventhub.json changed, than Event Hubs gets redeployed, but the storageaccount.json will be skipped.

1
Hi Samantha, Does Kamil's answer help? Please check it and kindly let us know the result. - Edward Han-MSFT

1 Answers

0
votes

You can combine the following command

git diff --name-only HEAD HEAD~1

with your deployment script.

But... Why do you want to detect what has been modified? Do you want to optimize deployment time? If yes, then combine all templates into one and let Azure Resource Manager deploy them in parallel while maintaining defined dependencies.