TFS 2015 is missing the "Deploy Azure App Service" task - azure

I'm using TFS 2015 (Microsoft Visual Studio Team Foundation Server
Version 14.102.25423.0)
but, I could only see "Azure Web App Deployment" Task, but not the "Deploy Azure App Service" task. How do I get the App Service task in my TFS Build definition.
This is the task I see in my TFS-
enter image description here
This is the task I want-
enter image description here

The Azure Web App Deployment task has been deprecated. But in TFS 2015, it still using it and in TFS 2017 and VSTS, it has been updated to use the Azure App Service Deploy task.
So if you want to use Azure App Service Deploy task, you could upload this task using tfx command to manually. The source files of the Azure App Service Deploy task is on the Github site. You could clone down the repository first.
tfx command to upload a build task:
http://donovanbrown.com/post/how-do-i-upload-a-custom-task-for-build
https://github.com/Microsoft/tfs-cli

Related

Azure function app deploy and release pipeline error

I pushed my .net core function application using visual studio and now setting up release pipeline. I can publish and execute the application just fine and it works great on the Azure portal. However when I see the builds for releases in azure-devOps that slot fails with the following error.
2019-06-19T23:21:33.3543380Z ##[error]Error: Deployment of msBuild generated package is not supported. Change package format or use Azure App Service Deploy task. D:\a\r1\a\_...AVFunctionCore.zip
I am not sure where I need to check in my setup to even start diagnosing the issue.
Here are the pipeline steps.
I create a new stage and then select a template of type (Azure app service deployment)
Under tasks
App type is Function App on Windows
Give the app name, resource group , give the slot and
package folder as
$(System.DefaultWorkingDirectory)/**/AVFunctionCore.zip
Everything else on this is left as default.
Azure function app deploy and release pipeline error
According to the error message:
Deployment of msBuild generated package is not supported. Change
package format or use Azure App Service Deploy task.
It seems you are not using the correct task to publish the generated package. Since the generated package is .zip, you can try the suggestion as error message said use Azure App Service Deploy task.
Azure App Service Deploy task:
Use this task in a build or release pipeline to deploy to a range of
App Services on Azure. The task works on cross-platform agents running
Windows, Linux, or Mac and uses several different underlying
deployment technologies.
The task works for ASP.NET, ASP.NET Core, PHP, Java, Python, Go, and
Node.js based web applications.
The task can be used to deploy to a range of Azure App Services such
as:
Web Apps on both Windows and Linux
Web Apps for Containers Function
Apps on both Windows and Linux
Function Apps for Containers
WebJobs
Apps configured under Azure App Service Environments
Check this blog Visual Studio 2017 Tools for Azure Functions and Continuous Integration with VSTS for some more details.
Hope this helps.
I get predefined pipeline from VS integration. So for those you have the same case:
In GUI/Classic mode Release page -> edit pipeline
Edit task in stage section (this is responsible for deploying)
Replace Azure Web App task with Azure App Service deploy
I have more than one project (web api + azure function) in my solution. For the web app I used the zip file, but for the azure function to work I needed to publish the whole folder.
Azure Function
Package or folder:
$(System.DefaultWorkingDirectory)/_Backend/drop
Web Api
Package or folder:
$(System.DefaultWorkingDirectory)/_Backend/drop/ClientAPI.zip

VSTS release to azure succeeded but url doesn't work

I have a simple MVC application. In VSTS, build is success and release to Azure WebApp is also success. But azure url doesn't work. Application runs & works in local. Azure WebApp also looks good. Not sure if its issue with Azure or VSTS Release pipeline. IS Azure WebApp capable of running MVC applications?
My VSTS release pipe-line:
First, the MVC application (MVC template project in Visual Studio) can be run on Azure Web App.
Secondly, the App Service URL option of Azure App Service Deploy task Provide a name, like FabrikamWebAppURL for the variable for the AzureRM Web App Hosted URL. The variable can be used as $(variableName), like $(FabrikamWebAppURL) to refer to the Hosted URL of the AzureRM Web App in subsequent tasks, such as PowerShell.
Thirdly, you can refer to these steps below to build and deploy application:
NuGet Tool Installer (Version of NuGet.exe to install: 4.3.0)
NuGet restore
Visual Studio Build (MSBuild Arguments: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)")
Publish Build Artifacts (Path to publish: $(build.artifactstagingdirectory))
Create a new release definition
Azure App Service Deploy (Package or folder: $(System.DefaultWorkingDirectory)/**/*.zip)

How to deploy azure webjob automatically via VS Team Services - release

I want to deploy azure webjob using build and release management of visual studio team services.
I have created a webjob project and I already deployed from visual studio and I am looking to make the deployment automatic.
Thank you!
Refer to these steps to publish/deploy web job:
Open VS 2015 and create a Web Job project (e.g. WebJob1)
Right click the project > Publish As Azure WebJob, then it will create webjob-publish-settings.json file (This is required)
Create a build definition, steps:
NuGet Installer (Path to solution or packages.config: **\*.sln; Installation type: Restore)
Visual Studio Build (Solution: **\*.sln, MSBuild Arguments: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\")
Publish Build Artifacts (Path to Publish: $(build.artifactstagingdirectory); Artifact Name: drop; Artifact Type: Server)
Queue build
Create a release definition and link to that build definition(Artifacts tab), tasks:
Azure App Service Deploy (Specify Azure Subscription and App Service name; Package or Folder: $(System.DefaultWorkingDirectory)\**\WebJob1.zip
Create a new release
On the other hand, to configure the Azure service endpoint, you can refer to this blog: Automating Azure Resource Group deployment using a Service Principal in Visual Studio Online: Build/Release Management.

Azure Functions deployment source Visual Studio Team Service project

I am trying to link the Azure Functions deployment to integrate with Visual Studio Team Service however once I select VSTS as the source, it doesn't show any other projects.
I have other web apps in my account which feed from a VSTS project.
The reason this is important to us is because of the workflow. We currently use AWS API Gateway + Lambda for our webhooks however it doesn't fit our development/deployment workflow.
When you select "Visual Studio Team Services" as deployment source from New Azure Portal, it is using Kudu service which is designed for Git version control. So it will only show the projects with "Git" repositories.
Kudu is the engine behind git deployments in Azure Web Sites. It can
also run outside of Azure.
If you want to deploy the TFVC project, try with Azure Classic Portal. You can refer to this article for details: Continuous delivery to Azure using Visual Studio Team Services

Azure Continuous Deployment - Setup Publishing with VSO

We've been able to setup Azure Continuous Deployment with some VSO Team Projects, but not others. Any idea why we are getting this error in the Azure Management Portal? Perhaps it depends on the age of the team project.
Unable to find AzureContinuousDeployment.11.xaml in TeamProject see [Link]
We've followed the directions suggested:
Integrating Azure Continuous Integration with VSO
Add Build Template AzureContinuousDeployment.11.xaml to $/[TeamProject]/BuildProcessTemplate
Created Build Definition in [TeamProject] referencing AzureContinuousDeployment.11.xaml in Step 1 (i.e. Registering the Template)
Proceed with "Set up publishing with Visual Studio Online". Enter VSO host and select [TeamProject].
I can see there are connected services under the [Team Project] in VSO (under Team Project Admin -> Services).
Turns out the Azure Portal/VSO error message needs updated to reflect new Azure Continuous Deployment updates for TFS 2013 (Microsoft.TeamFoundation.Build.Client).
Proper Error Message
Unable to find TfvcContinuousDeploymentTemplate.12.xaml in [TeamProject] see [Link]
The fix is to upload the TFS 2013 Azure CD template and create a build definition to register the template with the [TeamProject].
This is only necessary for older VSO projects that don't get the default Azure CD build template.

Resources