Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to replace a token on deploy through TFS 2015 Release hub on Web Access?

I have a team that is working on a Windows service project and need to have environment specific configurations set in their *.exe.config file. They have set up their transformations to leave behind a token if the build is made with the release configuration.

Now I need to create a release definition using the new integration in the release hub through the Web access; I have come across multiple solutions based on the server/client solution Microsoft used previously for their release management but have found no analogue in the tfs 2015 web access.

So, is there an out of the box task to replace tokens on the services configuration file? Or do I need to create a powershell script capable of said functionality, copy it to the target server and then run the replace manually? I'm working as a deploy manager and thus only have access to agents and the tfs server through the website access.

like image 246
Carlos Emilio Medina Bañuelos Avatar asked Mar 12 '23 13:03

Carlos Emilio Medina Bañuelos


1 Answers

I'm going down the PowerShell DSC route for everything - not only configuring the server but then also for deploying the bits (previously copied to a local temp location using a Windows Machine File Copy task) but also for token replacement using xReleaseManagement which works very well indeed.

I'm a week away from publishing a blog about how do use DSC with RM but see here for a DSC precursor to this post and here for the broad details of the road I'm going down.

like image 179
Graham Smith Avatar answered Mar 15 '23 02:03

Graham Smith