0
votes

I have Build pipeline and release pipeline in Azure DevOps which works fine. I want to start the website using power shell script which is in repo ,only after post-deployment approvals in release pipeline. Do some initial Manual checks and start the website

Release Pipeline

Task 1: stop website

Task 2: deploy website

Do initial Manual checks before starting the website

Task 3: Start website using post-deployment approvals

1
Hi Did you get a chance to check out below answer? How did it go? - Levi Lu-MSFT

1 Answers

0
votes

I am afraid it is impossible to invoke powershell scripts from post-deployment approvals.

However, if your website is deployed to azure resources. You can run the powershell scripts by Invoking Azure Function from post-deployment gates. You will need to create a Azure function to start the website using powershell script. See document Create a PowerShell function in Azure using Visual Studio Code.

There is another workaround using Manual intervention task instead of post-deployment approvals.

You can add an agentless job to run Manual intervention task(Notify the users to approve) after website is deployed.

enter image description here

And then run the power shell script to start up your website in the next job see below:

enter image description here