3
votes

Using the Azure portal I have successfully configured Azure's Continuous Deployment for an Azure Web App (Web Site) from a GitHub or BitBucket repository.

Is it possible to automate the process with a PowerShell script? If required I'll use a REST endpoint. My googling for a solution has lead me nowhere.

2
Why the down vote? What is the question missing.Tim Murphy

2 Answers

1
votes

This PowerShell just worked fine for my continuous deployment web site.

Import-Module azure*
Login-AzureRmAccount
$MyResourceGroup = 'myresourcegroupname'
$MyResourceName = 'myresourcename'
Invoke-AzureRmResourceAction -ResourceGroupName $MyResourceGroup -ResourceType Microsoft.Web/sites -ResourceName $MyResourceName -Action sync -ApiVersion 2015-08-01 -Force -Verbose

Thanks to this answer: https://stackoverflow.com/a/36501283/2805509

-1
votes

I'm sure this can be automated using PowerShell. What CI tool do you use?

I am using TeamCity and you can configure it to pull the source codes from your github or any other source control systems and then automate the deployment process using PowerShell. Work like a charm for me!