Skip to content

Instantly share code, notes, and snippets.

@sdurandeu
Created June 30, 2017 19:28
Show Gist options
  • Select an option

  • Save sdurandeu/f17869407ad813bee373a126796ddf74 to your computer and use it in GitHub Desktop.

Select an option

Save sdurandeu/f17869407ad813bee373a126796ddf74 to your computer and use it in GitHub Desktop.
Publish an Azure WebJob with MsBuild from Powershell script
# Notice the '' around the username to escape the $ sign
$queueDefaultAssetsWebjobProjectPath = Resolve-Path -Path $queueDefaultAssetsWebjobProjectPath
$arguments= "$queueDefaultAssetsWebjobProjectPath /p:Configuration=Release /p:DeployOnBuild=true /p:DeployTarget=MsDeployPublish /p:MsDeployServiceUrl=$($configuration.ApiPublishingUrl) '/p:UserName=$($configuration.ApiPublishingUserName)' /p:Password=$($configuration.ApiPublishingPassword) /p:DeployIisAppPath=$($configuration.ArmParameters.AppServiceApiName) /p:SkipExtraFilesOnServer=true"
Write-Host "Publishing webjob 'QueueDefaultAssetsWebJob' with MSDeploy..."
iex "&$msBuild $arguments"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment