Channels and IAAC

We have a good few deployments that aren’t using a packages as they will be deploying IAAC to AWS. The current situation I have is deploying an image from ECR to ECS.

I was hoping that based on the release version (which we are auto creating on the build server) that we could setup the channel version rules based on the release version to select the correct channel.

However; it seems that this functionality is package driven and can’t be used for IAAC?

Can you confirm my understanding is correct please? and is there anything I can do to drive the channels based of something like the release version instead of a package version?

p.s I can write code on the build server when calling octo create-release to determine rules for selecting the channel, but it would be much better if this control was in the hands of the Build Engineers.

Hey Jon,

Thanks for reaching out.

Actually, the only way you can choose a channel is when you create a release. You can have other things automatically selected based on the channel, like package versions, but you can’t automatically select the channel based on other aspects of the release.

Here is some documentation on channels that gives more information just in case you haven’t already read it: https://octopus.com/docs/deployment-process/channels

Please let me know if you have any other questions or concerns.

Thanks,
Jeremy

Hey Jeremy

This documentation suggests that the Channel can be selected automatically:
https://octopus.com/docs/octopus-rest-api/octopus-cli/create-release

–channel=VALUE [Optional] Name or ID of the channel to use for
the new release. Omit this argument to automatically select the best channel.

My understanding was that it selects this based off the versioning rules, hence the package version is what is driving the channel selection.

But as I don’t have a package I was hoping this could be driven off something else? Ideally the release version.

Thanks
Jon

Hey Jon,

Sorry about that, you’re right. Channels CAN be automatically selected, but its based on packages only like you previously said, not releases.

As a workaround, as part of your build process you could create an empty zip file that matches the release number, add it to the deployment process+release, and have the channel rules be applied from that package version.

I know it’s kind of a hacky workaround, but once you have it set up there should be no extra work.

Keep in mind, if your package version applies to the rules of 2 channels, it will always select the default, and if there is no default, the release creation will fail.

Automatically selecting a channel based on release number does seem like a good feature for us to have, so I will definitely pass this along to our product team. I can’t make any promises on if/when it will get implemented, so for now if you want to do this the workaround might be your best bet.

Please let me know if you think that will work for you or if you have any other questions or concerns.

Thanks,
Jeremy

Hi Jeremy,

Thanks for the update.

Let me investigate the empty versioned zip. It could get me to where I want to be, thanks.

Jon

Hi Jon,

You’re very welcome.

Yes please let me know if it works or not and maybe we can think of something else as a workaround.

Thanks,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.