OctoPack - push to server and build with specific Lifecycle

Michael W's Avatar

Michael W

16 May, 2017 05:52 PM

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?

  1. Support Staff 1 Posted by Kenneth Bates on 17 May, 2017 02:30 AM

    Kenneth Bates's Avatar

    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

  2. 2 Posted by Michael W on 17 May, 2017 03:01 PM

    Michael W's Avatar

    Is Octo.exe the same as OctoPack?

  3. Support Staff 3 Posted by Kenneth Bates on 18 May, 2017 05:19 AM

    Kenneth Bates's Avatar

    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. :)

    Best regards,

    Kenny

  4. Paul Stovell closed this discussion on 25 Aug, 2017 05:02 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac