diff --git a/azure-pipelines-templates/deploy/step/webjob-deploy.yml b/azure-pipelines-templates/deploy/step/webjob-deploy.yml new file mode 100644 index 00000000..34248d82 --- /dev/null +++ b/azure-pipelines-templates/deploy/step/webjob-deploy.yml @@ -0,0 +1,31 @@ +parameters: + ServiceConnection: '' + AppServiceName: '' + DeploymentPackagePath: '' + VirtualApplication: '' + +steps: + +- task: AzureAppServiceManage@0 + displayName: 'Stop all continuous webjobs - ${{ parameters.AppServiceName }}' + inputs: + azureSubscription: ${{ parameters.ServiceConnection }} + Action: 'Stop all continuous webjobs' + WebAppName: ${{ parameters.AppServiceName }} + +- task: AzureRmWebAppDeployment@4 + displayName: 'Azure App Service Deploy: $(AppServiceName)' + inputs: + azureSubscription: ${{ parameters.ServiceConnection }} + WebAppName: ${{ parameters.AppServiceName }} + Package: ${{ parameters.DeploymentPackagePath }} + ${{ if ne(parameters.VirtualApplication, '') }}: + VirtualApplication: ${{ parameters.VirtualApplication }} + +- task: AzureAppServiceManage@0 + displayName: 'Start all continuous webjobs - ${{ parameters.AppServiceName }}' + inputs: + azureSubscription: ${{ parameters.ServiceConnection }} + Action: 'Start all continuous webjobs' + WebAppName: ${{ parameters.AppServiceName }} +