-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Hello (it's me again 😂)
I've been investigating and trying to modify the Pipeline via the publish.yml file to start our Azure VM at the start of the pipeline, run the pipeline as it is at the moment, then stop (shutdown) the VM at the end of the pipeline so we can hopefully save some VM running costs in Azure
As I'm not all that familiar with .yml files and the pipeline, I have done a bit of research. I've found a Multi-part guide from a Microsoft expert - and this part is 9 (of 10):
https://community.dynamics.com/blogs/post/?postid=d4edf8e6-449c-441c-9e30-84d7c6cb3665
(Links to the other 9 parts of the guide can be found here: http://www.mynavblog.com/tag/azure-devops/)
I think what they are trying to achieve is quite similar to the way the Intune App Factory is setup, so I suspect it 'should' be possible to use this example with minimal changes within our publish.yml file.
I suspect I need to define these variables (AzureResourceGroup and Azure Subscription) within the existing variables section with appropriate values as per our setup
Then add a 'Stage: 0'
I think lines 8 to 22 in the example could probaby be inserted after the stages: heading (I'd actually move the stages: heading above the Stage: 1 comments) - Updating the pool name and vmImage (as appropriate for us)
Then lines 25-39 could be appended to the end of our publish.yml script - again updating the pool name and vmImage (as appropriate for us)
To me this seems feasible, but I just can't get it to work... I get a Pipeline error "Configuring the trigger failed, edit and save the pipeline again" breaking the whole pipeline when I add these settings with my best guess.
I know this is me trying to modify your original code, but just wondering if you or anyone could assist or wish to make the same cost savings?