0
votes

I would like to call an azure automation runbook from Azure DevOps as a task.Perhaps a task is not avaible for this then can we create some sort of a trigger from a task and let that trigger the runbook? eg: Create a file in blob storage and that can trigger an automation runbook? If yes which trigger can I create from Azure DevOps? I could not find a blob trigger for runbook.

My goal is to run some tasks inside a VM throug Azure Automation (as it is a hardened VM that cannot be accessed from DevOps). So I create the VM through DevOps then I want to trigger runbook to take over(or run it as the next devops task).

1
Just a bit confused between the title and the content of the question. Could you elaborate a bit on the use case? You could try to create a task that would call the runbook via an HTTP post? docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/…Ked Mardemootoo

1 Answers

0
votes

Calling Azure Automation runbook as a task from Azure DevOps

You could create a service connection with Azure Resource manager:

enter image description here

Then use the Azure powershell task to execute the powershell scripts:

enter image description here

You could check the document USING AZURE DEVOPS PIPELINES WITH AZURE AUTOMATION for some more details.