Rajesh
Rajesh

Reputation: 199

Error Deploying to Azure in Build pipeline

I'm working on creating a build pipeline that to compile an ApiWebApp and deploy it to Azure from Visual Studio Online. My build flow is:

My questions are:

Upvotes: 2

Views: 624

Answers (2)

Vicky - MSFT
Vicky - MSFT

Reputation: 5010

Yes, it is reasonable, and you have the right build steps in your build definition.

You need to have a check on this blog, it describes the details on how to deploy an Azure Web Site using the new build system in Visual Studio Online.

Here are some important steps I would like to highlight from there:

  1. Firstly, you need to register your Azure subscription in TFS.
  2. Secondly, in the Visual Studio Build step, pass the following argument to MSBuild: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.stagingDirectory)" These specific settings will create a web deploy package and put it in the staging directory of the build definition.
  3. Thirdly, in the Azure Web App Deployment step, set Web Deploy Package $(build.stagingDirectory)\projectname.zip.

Upvotes: 1

Aram
Aram

Reputation: 5695

Yes it is reasonable.

Here are the steps:

Step 1: Create a team project

Step 2: Check in a project to source control

Step 3: Connect the project to Azure (In azure portal)

Step 4: Trigger a rebuild and redeploy your project

Here is a complete steps on how you can do it:

https://azure.microsoft.com/en-us/documentation/articles/cloud-services-continuous-delivery-use-vso/

In the package text box you can enter: ($build.stagingDirectory)YourProjectName.zip

Upvotes: 0

Related Questions