-2

Our project is using TFS 2017, we have more than 20 builds created for a single release so for next release we have to again create these builds with different release number and server to be deployed name. Can we have an automated process to create these builds at once using some script or any tool is there with the help of which we can easily create builds or powershell script that can help for the same.

2
  • Did you mean you have 20+ build definitions? Commented Nov 28, 2017 at 6:42
  • yeah more than that , we are supporting Bell protal. So have to make many builds each time when one release went off other comes in. Commented Nov 29, 2017 at 0:12

1 Answer 1

0

You could use TFS REST API to programmatically create and update build definitions.

Just use a JSON file to set up a vNext build definition, then use the Invoke-RestMethod to get it running.

Create a build definition:

POST https://{instance}/DefaultCollection/{project}/_apis/build/definitions?api-version={version} 

Update a build definition:

PUT https://{instance}/DefaultCollection/{project}/_apis/build/definitions/{definitionId}?api-version={version} 

For more detail steps you could refer below tutorials:

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your help, I will try this one. Will need your help if face any issues. Thanks a lot.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.