Team Services | TFS 2017 | TFS 2015 | Previous versions
This topic shows you how to:
Create a new release definition
Open the Build & Release hub and choose Releases.
Choose the + icon and select Create release definition.
Select a template
If a template is relevant to your scenario, select it to automatically add some tasks and apply typical settings. For example, if you select the Azure App Service Deployment template, you automatically get a task to deploy your app to Azure App Services.
Start with an empty definition
If there's no template for your scenario, select Empty and then add the tasks you need.
Specify the artifacts, deployment trigger, and queue
Choose the type of source for your artifacts, if appropriate, and specify the details such as the project and build definition.
If you want the release to start when a new build of the artifacts is available, set (tick) the Continuous deployment... checkbox.
Choose an agent queue if you don't want to use the Hosted queue.
Replicate a definition
If your definition has a pattern that you want to replicate in other definitions, clone it or export it.
When you clone a definition, the copy appears in your list of releases. You can save it with a new name.
When you export a definition, you can import it afterwards. Then, if required, modify it and save it with a new name.
Create and use a template
Create a template for a definition from an environment within the definition.
After you create a template, it appears in the Custom tab of the Create release definition wizard. Your team members can use it to follow the pattern in new definitions. For more details, see Environment templates in Release Management.
Use the REST API
Create release definitions using the Release Management REST API.
Add more environments
A release definition, by default, contains a single environment. Configure additional environments in a release definition to represent the target server(s) or locations where you will deploy your app.
Open the + Add environment list and choose Create new environment.
In the Add new environment dialog select a template for the new environment to automatically add appropriate tasks, or create an empty environment with no default tasks.
Choose Create and then edit the new environment name as required.
After you have created and configured your environments, add tasks to them.
You can add environments using the Release Management REST API.
Define processes in an environment
Select an environment in the definition and choose + Add tasks. By default, the task selector shows tasks generally used in a release definition. More tasks are available in the other tabs of the Task catalog dialog. A link at the bottom of the list takes you to Visual Studio Marketplace where you can download and install additional tasks.
You can add tasks specifically for execution on the release agent or on the server.
You can add tasks to an environment using the Release Management REST API.
Use task groups
A task group lets you to encapsulate a sequence of tasks already defined in a build or a release definition into a single reusable task that can be added to a build or release definition just like any other task. You can choose to extract the parameters from the encapsulated tasks as configuration variables, and abstract the rest of the task information.
For more details, see Task groups.
Clone an environment
A release definition often contains several environments such as development, testing, QA, and production. Typically, all of these environments are fundamentally similar - and the techniques used to set up and deploy to each one are the same with the exception of minor differences in configuration for each environment and task (such as target URLs, service paths, and server names).
After you have added an environment to a release definition and configured it by adding tasks and setting the properties for each one, clone it to create another environment within the same definition.
Alternatively, select the environment you want to clone in the environments column, open the + Add environment list, and choose Clone selected environment.
The cloned environment has the same tasks, task properties, and configuration settings as the original.
Release definition concepts
A release definition contains all the tasks and settings used to create a release and deployment to your target machines. To learn more about release definition settings, see:
Where can I learn step-by-step how to build and release my app?
How do I programmatically create a release definition?
Do I need a build agent?
You need at least one agent to run your build. Get an agent.
I can't select a default agent queue and I can't queue my build. How do I fix this?