Blog

Setting Up TDS 5.8 to Build to Azure Using Visual Studio Build and Pipelines: Local Set Up

April 02, 2019 | Kliment Klimentov

By using TDS 5.8 and Web Deploy packages, I'll walk you through on how to create a fully automated build and deployment process from your workstation to source control and into your Azure environment. This is a simplified scenario that describes a build process which can be used for a starting point. Depending on your organizational (or customer) needs and additional preferences, the build process could be more complex.

The TDS Web Deploy packages were designed around quick and easy deployments to Azure, but they can be deployed to any Sitecore server that supports Web Deploy.


The difference in using .update packages and Web Deploy packages 

With TDS versions before 5.8, most build configurations used Update packages to deploy changes to Azure environments. This is still a good way of deploying code, but it comes with some downsides. To automate the process, we used the Sitecore Package Deployer tool which waits for a package in a certain location and installs it automatically once the package is present. Unfortunately, the Update package API didn't give us many details about the progress of the installation. We only received notifications of completion and success/failure. Determining the reason for failure requires downloading logs from the server. 
Chart showing deployment before TDS 5.8

Workflow before TDS 5.8


TDS 5.8 introduces a better approach for deploying Sitecore items and code in Azure environments. Using Web Deploy packages and a PowerShell script provided by TDS, we provide better information about the progress of the deployment into your Azure hosted Sitecore instance. The new deployment process in TDS 5.8 also includes huge performance benefits with faster deployments.

Chart showing deployment process with TDS 5.8

Workflow after TDS 5.8

Setting up the TDS project for Web Deploy

The Web Deploy Package tab has similar options to the Update package tab. You can enable building a Web Deploy package, what to include in the package, and the package name. In this example configuration, we'll need a Web Deploy package, so we'll check off "Build web deploy package." The name can be left blank, and it will use the name of the project.

Window showing Web Deploy Package Tab

Since we are planning to build on the cloud based VSO build server, we need to add the TDS Build components NuGet package into the TDS project. To do this, you need to execute the following command in the Package Manager Console of Visual Studio. Side note: make sure you have selected the nuget.org repository while executing this command. 

Install-Package HedgehogDevelopment.TDS -Version 5.8.0.6



Building the Web Deploy package

To create the Web Deploy package, simply build the project/solution with the configuration where Web Deploy packages are enabled. When the build is finished, you will find a folder called [Configuration]_WebDeploy with the Web Deploy package and the Web Deploy PowerShell script.

Image showing Publish Web Deploy and TDS Project files

Please note: the PowerShell script provided by TDS isn't the only way to install the package. It is provided as a convenience for the developer to help them deploy the package if they don't have another method of deploying it. It also contains script that can be used to monitor the deployment on the server.

Testing the Web Deploy package

Once you have the Web Deploy package and the PowerShell script, you only need to specify where it should be deployed. This can be easily set using a Publish Profile from Azure or by using parameters to the PublishWebDeploy.ps1 script. You can get a publish profile from the control menu of the App Service in Azure.

control menu of App Service in Azure

Now you can make a test deployment to the Sitecore instance using the script. I placed my Publish Profile file in the same directory where the Web Deploy package and the script were generated. 

If you want to deploy the Web Deploy package into your Azure instance, all you need is to execute the script using the following parameters: 

PublishWebDeploy.ps1 -PackagePath TDSProject1.wdp.zip -PublishSettingsPath tdstestinstance-630820-single.PublishSettings -ViewLogs



Summary

This completes the setup of the TDS project for building Web Deploy packages. Soon, I'll walk you through on how to set up a TDS build in a Visual Studio Online Build Pipeline. 

Ready to move on to the next step? Click here to read about configuring Azure DevOp's Build Pipelines.

 

Need to skip ahead to configuring Azure DevOp's Release Pipelines? Click here to read Part Three.

Take TDS 5.8 for a spin with a 30-day free trial or purchase it today!

TDS Classic TDS 5.8 Kliment Klimentov

Related Blog Posts

TDS Classic goes to Australia
Hedgehog Solution Architect, Sean Holmesby will be presenting at SUGCON ANZ. He gave insight on his topic and more. 
TDS Classic to Support Rainbow
<p>At SUGCON London, Sitecore announced they would be switching over their default serialization format to Rainbow, a YAML-based format for Sitecore serialization in Sitecore version 9.2., and TDS Classic is ready to support it. </p> <div>&nbsp;</div>
What is New in TDS Classic 5.8?
We go over the new features in TDS Classic 5.8 that can help significantly improve your experience.
Setting Up TDS 5.8 to Build to Azure Using Visual Studio Build and Pipelines: Configuring Azure DevOp's Release Pipeline
In this part, we are configuring the setting in the Release pipeline to deploy our Web Deploy package.
Setting Up TDS 5.8 to Build to Azure Using Visual Studio Build and Pipelines: Configuring Azure DevOp's Build Pipeline
In this part, we'll configure only the steps in the Build Pipeline, and publish the build drop (a Web Deploy package and a PowerShell script) to the Release pipeline.
A Look Back at TDS Classic
TDS Classic has been helping Sitecore developers for 10 years. We spoke with Sitecore Solution Architect and Chief Product Scientist, Charlie Turano to reflect back on the making TDS Classic.&nbsp;
Hedgehog Announces the Release of TDS Classic 5.8
Hedgehog announced the release of TDS Classic 5.8. The newest update now supports Azure and Visual Studio 2019.
TDS Classic Licensing FAQ
Answers to a number of frequently asked questions regarding the licensing of TDS Classic.
The Benefits of Renewing a TDS Classic License
New features and early access to the latest and greatest in the Essential Collection are just a few reasons to keep your TDS Classic license active.
Guide to Sitecore Packaging
Development of features and components requires a set of Sitecore items to be packaged - things like renderings and templates. With TDS Classic, Sitecore developers can automate the packaging process.&nbsp;
TDS Classic as a Tool for Technical Audits
TDS Classic provides Project Report generation for Sitecore items, which can be very helpful with technical audits
TDS Classic: Content File Sync
Content File Sync is a fantastic time saver for any Sitecore developer.
TDS Classic How-To: Perform Unattended Installation of TDS Classic for Visual Studio 2017
The TDS Classic version for Visual Studio 2017 is installed a bit differently than previous versions; the process is separated in two parts and performed by two different installers.
TDS Classic 5.7 - Lightning Deploy
Lightning Deploy Mode&nbsp;can be used to enable Lightning Mode for all deployments that utilize the TDS Sitecore Connector in their configuration, improving their speed and efficiency.
TDS Classic 5.7 - Lightning Sync
Lightning Sync allows both sync and quick push operations to use TDS Classic 5.7's new Lightning Mode feature
TDS Classic 5.7 - Solution Wide Sync
A simple new feature in TDS Classic 5.7, Solution Wide Sync makes a big difference when working with many TDS Classic projects in a solution.
TDS Classic 5.7 - Lightning Mode
Lightning Mode helps to improve the speed and efficiency of both deploy and sync operations.&nbsp;This enhancement is achieved by modifying how item comparisons are performed.
TDS Classic Best Practices: NuGet Build Components and TDS Classic .user configs
There are certain systems and processes that you can put in place to make a TDS Classic project run more smoothly. We're highlighting the best practices that our team recommends for getting the most out of TDS Classic.
TDS Classic Best Practices: Bundle Packages, Delta Builds and Delta Packages
Following TDS Classic best practices, like using Delta Builds and Delta Packages, can make the entire development experience run much more smoothly.
TDS Classic Best Practices: Validators and the Sitecore Package Deployer
TDS Classic can be used in many ways, but the goal is always the same: make development (and developers lives) easier. Whether it's using the Sitecore Package Deployer or using validators, following best practices can make your entire experience run much more smoothly.
Troubleshoot and Prevent Failed TDS Classic Project Builds
When building an .update package with TDS Classic, the build might fail with no additional information. From increasing log verbosity to using validators, there are ways to minimize or prevent this type of error.
TDS Classic How-To: Disable Automatic Code Generation
Code Generation is automatically triggered after every change in the TDS Project tree. If a project contains many items, users can disable this feature for their convenience.
TDS Classic Sitecore Deploy Folder
Sitecore Deploy Folder is a setting, located in the build tab of the TDS Classic Project's Properties page, and used to tell TDS Classic where the webroot is located.<br>
TDS Classic Builds on Jenkins Build Server with NuGet Packages
Our simple scenario includes 2 developers using TDS Classic and checking-in changes to source control. The Jenkins build server takes the changes and performs the build, and then deploys the created package to two Sitecore environments.
Features to Improve Sitecore Development: TDS Classic Strikes Back
Each and every feature in TDS Classic is aimed at helping developers. Whether the feature is out front or running quietly in the background the goal is always the same: make the development experience better. &nbsp;&nbsp;
TDS Classic Features to Improve Sitecore Development
Each version of TDS Classic comes with the same goal: to make Sitecore development and, by extension, developers, lives easier. Every feature in our products is aimed at making the process better - some of these features aren't quite as well-known as others, but they all help smooth and improve the development experience.
Deployment Properties and the Deployment Property Manager
When working with TDS Classic, you will eventually need to deploy your items to a Sitecore instance and you might not want the default behavior of every item in your TDS project deploying every time. This is where the TDS Sitecore Deployment Property Manager comes in!
TDS Classic How-To: Use the HedgehogDevelopment.TDS NuGet Package
The HedgehogDevelopment.TDS NuGet Package allows you to build TDS projects, without the need of installed TDS on the build server machine.
TDS Classic 5.6 Feature Spotlight - Prevent Deployment of Incorrect Assemblies
This feature, new to TDS Classic 5.6, will prevent a solution from deploying unless all assemblies (except the excluded assemblies we allow you to specify) match what exists in your webroot.&nbsp;
TDS 5.6 Feature Spotlight - Project Item Report
This feature, new to TDS Classic 5.6, allows you to create a report of all items in the TDS Classic project.&nbsp;
TDS How To: Install the TDS Connector for Rocks 2.0
Manually install the TDS connector for Sitecore Rocks 2.0
Create TDS Classic Custom Post Deploy Step
Team Development for Sitecore Classic version 5.5 allows developers to add post deployment steps to to their deployments and update packages. TDS Classic has used post deployment steps internally to perform a number of useful functions. Many of the developers using TDS Classic have requested the ability to add their own post deploy functionality. With the release of TDS Classic 5.5 in early 2016, this functionality is now available.