I’m currently working at a client that requires some source code to compile in Unix - as their major systems are Unix based with new development being done in .NET. The great thing about the project is that they have are trying to consolidate everything into TFS as the single source of truth (it’s mostly there).
To get the unix stuff going I’ve customized the DefaultTemplate.xaml and added an extra InvokeProcess that calls a PowerShell script to copy files to Unix using Pscp (for secure remote copy), compile code using Plink (allows remote command execution over SSH) and finally copy the Unix binaries back to the build server.
The PowerShell script takes in a number of arguments like remote server details, remote paths, usernames etc. So obviously we don’t want these being set via the arguments property for the InvokeProcess activity because:
- Need to check out and modify the build template and checkin
- The build workflow isn’t exactly the nicest thing to modify
- Can’t reuse the template for other environments (UAT and Production)
- Can’t quickly make changes and queue a new build
What you should do instead is to define new Arguments for your template.