I have a question regarding version templates. This is our current version template:
#{Octopus.Version.LastMajor}.#{Octopus.Version.LastMinor}.#{Octopus.Version.LastPatch}.#{Octopus.Version.NextRevision}
Our releases are being created by octo.exe. For our dev brache we don’t supply a version number, for our release branch we do. The version number for dev is thereby defined by Octopus. Our dev branch version is for example 10.2.99.x, the version for release is 9.1.1.x. On some point in time the highest release is a dev version. When we create a patch on a release version we create a release version lower then the current version. When we then create a new dev release it wil increment on the release version where we would like to increment on the latest dev version.
So, I’m looking for HighestMajor, HighestMinor and HighestPatch. Do these exist? I couldn’t find these in the documentation.
The bad news is, no, there are no Highest... variables.
The good news is we have a new feature called Channels, which is designed exactly for scenarios such as this. It is currently available in pre-release, but will be available as part of release 3.2very soon.
You will be able to assign each release a channel (in your case maybe ‘Dev’ and ‘Release’). Then in your version template, you can use: #{Octopus.Version.Channel.LastMajor}, #{Octopus.Version.Channel.NextBuild}, etc.
Although there may be no ‘Highest’ variable for each of the version components, what are the values that Octopus will accept in 3.1? 3.2? I’m being called on to modify the version number.
Also, is there a Restful API (or some other API) that I could trigger from a TFS build workflow that would tirgger a release? I’m being asked to have finer control over package and release generation on Octopus.
–
John Merryweather Cooper
Senior Software Engineer | Integration Development Group | Enterprise Notification Service
Jack Henry & Associates, Inc.® | Lenexa, KS 66214 | Ext: 431050 |JoCooper@jackhenry.commailto:JoCooper@jackhenry.com
I figured out the Id’s from looking at the URI’s in the admin interface. I have a working MSBuild Task interface that assembles a Release based on NuGetPackageId’s and Version custom metadata, and a separate MSBuild Task that takes the resulting Release Id and Deploys it. Although it is very strange to me, I’m getting to like this REST API.