OctoPack - push to server and build with specific Lifecycle

We are using MSBUILD with Octopack and our command looks like the attached. We’re using “Invoke-MsBuild” and Powershell.

In certain cases, we want to be able to “tell” the OD server to use a specific Lifecycle once the package is uploaded.

Is there any way to do that?

Hi Michael,

Thanks for getting in touch! Octopus 3.2 introduced a feature called channels, which allows you to select a different lifecycle when you create a new release.

You can configure a channel in your project’s settings ( > Channels in your web portal), and select your chosen lifecycle. When you create a new release, you can select the different channel for that release, and it will deploy through the new lifecycle. If you’re creating your release with an Octo.exe create-release command, use the option --channel=VALUE to tell Octopus which channel to use for your release.

To take full advantage of the power of channels, you can also use version rules. This allows you to automate which channel will be selected for your release based on your package version.

Check out the following documentation page for additional information: https://octopus.com/docs/key-concepts/projects/channels
We also have a channels walkthrough blog post which includes a fantastic example: https://octopus.com/blog/channels-walkthrough

Let me know how you go, and if you have any further questions!

Best regards,

Kenny

Is Octo.exe the same as OctoPack?

Hi Michael,

Thanks for following up. To answer your question, they’re not the same. Octo.exe is a command line tool which can be used to automate certain functions which OctoPack wasn’t designed to do. While it can package your applications, like what OctoPack does, it’s more versatile in the sense that it can also be used to create other objects in Octopus (e.g. create and deploy releases, create environments, channels, etc.). We have a full list of available commands in Octo.exe in our documentation: https://octopus.com/docs/api-and-integration/octo.exe-command-line

If you’re wanting to use Octo.exe, a solution would be to run a command that creates your release in a specific channel. As an example, a command would look something like: Octo.exe create-release --project=HelloWorld --version=1.0.1 --channel=Hotfix --server=http://yourServerURL --apiKey=API-xxxxxx

You can download this Command Line tool from our site: https://octopus.com/downloads

If you’re not using Octo.exe, how are you currently creating your releases? More information on your specific setup will help us come up with a more tailored approach for your specific scenario. :slight_smile:

Best regards,

Kenny