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.
- Did you mean you have 20+ build definitions?PatrickLu-MSFT– PatrickLu-MSFT2017-11-28 06:42:02 +00:00Commented 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.Ayush– Ayush2017-11-29 00:12:38 +00:00Commented Nov 29, 2017 at 0:12
Add a comment |
1 Answer
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:
1 Comment
Ayush
Thanks for your help, I will try this one. Will need your help if face any issues. Thanks a lot.