How to: Create and deploy a release

VSTS | TFS 2017 | TFS 2015

You can create a release from the Releases tab, the Builds tab, and as part of a continuous deployment scenario. You can also create a draft release. After you create a release, you may need to deploy (and redeploy) it manually.

What's the difference between a release definition and a release?

Create a release from the Releases tab

  1. In the list of releases for a definition, choose Create Release from the Release drop-down list. Or select the release definition in the left column list of release definitions, open the shortcut menu, and choose Release.

    Creating a new release manually

    Alternatively, open the definition for editing. Then choose Create Release from the Release drop-down list.

    Creating a new release manually

  2. In the Create new release dialog, optionally enter a description for this release. Then select the version of the linked build artifacts you want to include in this release. If the version you want to use is not shown in the list, type the version number.

    Specifying details of a release

    For artifact sources of type Build, you must enter the BuildId value, not the BuildNumber. See Artifact variables.

Specifying manual deployment for an environment is one way to prevent a deployment happening until you are sure it is ready to go. However, you can also use approvals at intermediate stages to pause a release and allow it to be cancelled before it reaches the target or final environment. For more details, see Approvals.

Create a release from the Builds tab

If you have not set the continuous deployment trigger, or you have not defined a fully orchestrated pipeline for deploying the artifacts specified in your releases, you will need to manually initiate the deployment for some environments.

  1. Open the Builds tab of the Build & Release hub and select a build result (not the build definition name).

    Selecting a build in the Builds tab

  2. In the build summary page, choose Release.

    Creating a release from the Builds tab

    Alternatively, if the build has not yet been deployed, choose the Create release link in the Deployments section.

    Creating a release from the Builds tab build status view

Create a draft release

If you're editing a release definition and you want to test some changes that are not yet ready for production, you can create a draft release.

Creating a draft release

Make the changes you need (they don't affect the original definition), save the draft definition, and start it.

Starting a draft release

Deploy a release

When you create a from a release definition, you can see the current status of that release in the Summary view. In most cases, deployment of the release to all environments may occur automatically through environment deployment triggers. However, where this is not the case (as described in Releases), you must initiate deployment to environments manually.

Start the deployment to any environments that have not been deployed by opening the shortcut menu from the ellipses (...) in the Actions column and choosing Deploy.

Starting a deployment in a release

Alternatively, choose the environment you want to deploy to from the Deploy drop-down list in the toolbar.

Starting a deployment using the Deploy drop-down list

By selecting an environment that is not the final one, you can test the initial steps and tasks in a release safe in the knowledge that it will stop before, for example, deployment to a live production environment. You can also insert an agentless phase into a release definition, and use it to enable manual intervention in a release pipeline. For more details, see Task phases.

See also

Q&A

How do I programmatically create a release definition?

Release Management REST API

I use Team Foundation Server on-premises and I don't see some of these features. Why not?

Some of these features are available only on VSTS and not yet available on-premises. Some features are available on-premises if you have upgraded to the latest version of TFS.

Help and support