I had setup continuous integration with TFS2013 using OctoPack but when build is trigger getting different version number but we would like to customize build version as per our build release for Eg 1.0.1.0 or 2.0.1.0.
can you please help me to define version number as per our requirement.
Thank you for your email : I am on PTO and I will be back to the office on 16/August/2017, with no access to emails.
I will respond to your emails as soon as possible upon my return.
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.
What you want to do is use the first option and use the MSBuild parameter /p:OctoPackPackageVersion=[build variable] to define the package version. It’ll be up to you to figure out which build variable you want to use along with that parameter.
As mentioned before. the parameter you’ll need to pass is /p:OctoPackPackageVersion=[variable] . The tricky part is figuring out which variable you want to pass to that parameter. From memory (TFS2013 is pretty old by now) the variable that held the build ID was $(TF_Build_buildNumber). Then you were supposed to define the format of that variable in your build definition like this. Keep in mind that whatever you pass to /p:OctoPackPackageVersion needs to be semver compliant
If the build definition setup goes will, In the end you should end up using /p:OctoPackPackageVersion=$(TFS_Build_BuildNumber)
I noticed from your email signature that you are part of Accenture. I know from experience that your company has a pretty good devops team in charge of maintaining your TFS and Octopus Servers. I’m pretty sure that if you contact them, they’ll have more info about tweaking this xaml-based build definitions in order to get a variable with the value you want. I know at least Ian Paullin and Thadd Parker are part of that team and will be able to put you in contact with someone that can help you.