Build your Azure Cloud Service
TFS 2017 | TFS 2015
Here we'll show you how to define your continuous integration (CI) pipeline for your Azure Cloud Service project.
Get set up
For the instructions in this topic, you need an Azure Cloud Service project in Visual Studio.
Tip
If you don't yet have an app but want to try this out, then see the FAQ below.
Define your CI build pipeline
Create the build pipeline
Open your project in your web browser
(If you don't see your project listed on the home page, select Browse.)
- On-premises TFS:
http://{your_server}:8080/tfs/DefaultCollection/{your_project}
- Azure Pipelines:
https://dev.azure.com/{your_organization}/{your_project}
The TFS URL doesn't work for me. How can I get the correct URL?
- On-premises TFS:
Create a build pipeline (Pipelines tab > Builds)
- Select the Azure Cloud Service template.
- As the repository source, select the project, repository, and branch.
- Remove the Azure Cloud Service Deployment task from the build pipeline, since you will be deploying the cloud service later through a release pipeline.
Enable continuous integration (CI)
On the Triggers tab, enable continuous integration (CI). This tells the system to queue a build whenever someone on your team commits or checks in new code.
Queue and test the build
Save the build pipeline and queue a new build by selecting the Queue new build command. Once the build is done, click Artifacts and then Explore to see the cloud service package (.cspkg file) produced by the build. This is the package that your release pipeline will consume to deploy your app.
Deploy your app
After you've run the build, you're ready to create a release pipeline to deploy your app to:
FAQ
How do I create an Azure Cloud Service solution?
In Visual Studio, connect to your project.
On the Team Explorer home page (Keyboard: Ctrl + 0, H), under Solutions, click New.
Select the Cloud templates section, and then choose the Azure Cloud Service template.
When prompted for the roles in the cloud service, choose the ASP.NET Web role to the project.
When prompted for the type of ASP.NET project for the Web role, choose the MVC project.
Commit and push (Git) or check in (TFVC) your code.