Reputation: 7285
In TFS, I want to treat build definitions as a code that I can also check-in to some repository. This will benefit tracking deltas in case the build definitions got updated and is no longer in a working state. Also having it in a script provides me the option to run the script locally.
Is that possible in TFS? In practice, I prefer writing the builds,packaging, and deploy code via powershell. I am able to reuse my powershell scripts but I find creating build definitions sometimes easy but I was hoping that after I create the build definitions/steps, I can somehow extract it to a powershell script.
Upvotes: 0
Views: 196
Reputation: 59055
There is no built-in capability for that at the moment. The closest you can get is to use the REST API to extract the build JSON and then set up a CI/CD trigger to update the build definition using the REST API. It's not ideal. I agree with your approach.
There is a proposal to use YAML for exactly this purpose: https://github.com/Microsoft/vsts-tasks/blob/master/docs/yaml.md
Upvotes: 1