Let octo.exe auto-select the right Channel when creating a Release based on Version Rules
It would be really nice if octo.exe could make an intelligent decision and automatically select the correct Channel for a Release based on the Version Rules.
As of Octopus Deploy 3.2 you need to explicitly choose a Channel for a Release, unless you intend to use the Default Channel. This doesn't help when you are supporting multiple active versions.
Whilst this wouldn't work for every situation, it would be brilliant if I'm following a strict versioning convention for my packages and Releases, and configured explicit and independent Version Rules, that octo.exe could pick the right Channel.
I would imagine octo.exe would:
1. Have an extra argument like --channelAuto
2. Query the Project for Channels
3. Filter out Channels that don't have Version Rules that match the Release being created
4. If there's only one suitable Channel, use that. Otherwise raise an error explaining there were zero, or multiple Channels that could have been auto-selected, and the user should fix their Version Rules, or specify the Channel explicitly with the --channel argument.

Check out the GitHub issue and related pull requests https://github.com/OctopusDeploy/Issues/issues/2494
We ended up deciding to make this the default behaviour after a bunch of testing and working with some interested customers.
We have just finished this as part of Octo.exe 3.3.13 which shipped connected to Octopus 3.3.13, but the auto channel discovery will work with any release of Octopus 3.2 or greater.
-
Samuel Howes commented
It looks like this has been continued in the AutoChannel Feature here: https://github.com/OctopusDeploy/Octo.exe/pull/75 and under active development. Does anyone have an idea about the expected timeline for this feature? There are no milestones assigned to the PR.
-
Michael Noonan commented
The amazing Ryan Gribble has started a PR to implement this: https://github.com/OctopusDeploy/Octo.exe/pull/73
Take a look and make sure it will do what you expect!
-
Ben Duguid commented
Great idea - I'm trying to use Channels to control the lifecycles available to a release - at the moment we have the following lifecycles:
* Dev Only - Only deploys to our internal developer environments - used to dev. test feature branches as they are being worked on
* QA/UAT - Can deploy to our internal dev and QA environments, as well as client UAT environments - used to QA and UAT develop branch prior to release candidate.
* Full - Can deploy through the entire stack (Dev -> Production) - only available to release builds that can be considered for a production deployment.I'm tagging all the builds (possibly not strictly SemVer in this case) so that I can filter these within channels, but at the moment I'm having to work out which channel to use in our TeamCity build and pass that in as a variable to the Create Release step.
-
Michael Noonan commented
That's a good point David, since it's a more permissive argument, we should let the default behaviour be more permissive. Makes sense to me.
-
David White commented
This is a very sensible (brilliant, actually) idea. It makes sense for all our products - they either have Version Rules (to handle multiple simultaneous branches), or they don't.
--channelAuto is saying "I know that this could break if I don't get it right, but I'm doing this deliberately, because I want the functionality."
(Incidentally, if there are zero channels that match the Version Rules, shouldn't --channelAuto pick the Default channel?)
-
Michael Noonan commented
I'd be interested to see explicit examples where this would/wouldn't make sense for your own deployments.