Create-Release from TeamCity failing with Unrecognized command arguments: --ignorechannelrules

I have installed version 4.11 on TeamCity integration plugin.
Running Octopus 3.13.5

I have 4 channels configured in 1 project. The channels only use one setting - Pre-release tag which is set to the following:

  • master
  • feature-
  • release
  • version-

The idea being that builds on the master branch go to the master channel. Builds on any feature- branch go to the feature channel, etc

When I run a build in TeamCity on master, everything works fine and the release is added to the master channel.

When I run a build on a feature branch, release branch or version branch, I get the following error:

[11:44:06] [Octopus Deploy] Running command: octo.exe create-release --server http://octopus.autoguru.com.au --apikey SECRET --project Retail --enableservicemessages --version 3.14.1.4729-feature- --packageversion 3.14.1.4729-feature-
[11:44:06] [Octopus Deploy] Creating Octopus Deploy release
[11:44:06] [Octopus Deploy] Octopus Deploy Command Line Tool, version 2.6.3.60
[11:44:06] [Octopus Deploy]
[11:44:06] [Octopus Deploy] Handshaking with Octopus server: http://octopus.autoguru.com.au
[11:44:06] [Octopus Deploy] Handshake successful. Octopus version: 3.13.5; API version: 3.0.0
[11:44:06] [Octopus Deploy] Finding project: Retail
[11:44:06] [Octopus Deploy] Finding deployment process for project: Retail
[11:44:06] [Octopus Deploy] Finding release template…
[11:44:06] [Octopus Deploy] Using version number provided on command-line.
[11:44:06] [Octopus Deploy] Release plan for release: 3.14.1.4729-feature-
[11:44:06] [Octopus Deploy] Steps:
[11:44:06] [Octopus Deploy] # Name Version Source
[11:44:06] [Octopus Deploy] — ------------------------------ --------------- ------------------------------------
[11:44:06] [Octopus Deploy] 1 Deploy www.autoguru.com.au 3.14.1.4729-feature- User specified
[11:44:06] [Octopus Deploy] 2 Deploy api.autoguru.com.au 3.14.1.4729-feature- User specified
[11:44:06] [Octopus Deploy] 3 Deploy admin.autoguru.com.au 3.14.1.4729-feature- User specified
[11:44:06] [Octopus Deploy]
[11:44:06] [Octopus Deploy] Creating release…
[11:44:06] [Octopus Deploy] Error from Octopus server (HTTP 400): There was a problem with your request.
[11:44:06] [Octopus Deploy]
[11:44:06] [Octopus Deploy] - The requested package versions for the following steps violate the channel version rules: Deploy www.autoguru.com.au,Deploy api.autoguru.com.au,Deploy admin.autoguru.com.au. Please specify a different package version, channel or provide the ignoreChannelRules parameter to override this check.
[11:44:06] [Octopus Deploy]
[11:44:06] [Octopus Deploy] Exit code: -7
[11:44:06] [Octopus Deploy] Octo.exe exit code: -7

When I add the suggested command line argument, I get this error:

[11:58:52] [Octopus Deploy] Running command: octo.exe create-release --server http://octopus.autoguru.com.au --apikey SECRET --project Retail --enableservicemessages --version 3.14.1.4731-feature- --packageversion 3.14.1.4731-feature- --ignorechannelrules
[11:58:52] [Octopus Deploy] Creating Octopus Deploy release
[11:58:52] [Octopus Deploy] Octopus Deploy Command Line Tool, version 2.6.3.60
[11:58:52] [Octopus Deploy]
[11:58:52] [Octopus Deploy] Unrecognized command arguments: --ignorechannelrules
[11:58:52] [Octopus Deploy] Exit code: -1
[11:58:52] [Octopus Deploy] Octo.exe exit code: -1
[11:58:52] [Step 5/5] Unable to create or deploy release. Please check the build log for details on the error.
[11:58:52] [Step 5/5] Unable to create or deploy release. Please check the build log for details on the error.
[11:58:52] [Step 5/5] Step Create Octopus Release (OctopusDeploy: Create release) failed

If I change the default channel to release and build the release branch, a release gets created successfully in the release channel.

How can I get it to automatically pick the channel based on the version rule?

Thought it might have been too many numbers in the version so changed to semantic versioning.

[Octopus Deploy] Running command: octo.exe create-release --server http://octopus.autoguru.com.au --apikey SECRET --project Retail --enableservicemessages --version 3.15.0-feature-3076- --packageversion 3.15.0-feature-3076-
[12:53:51] [Octopus Deploy] Creating Octopus Deploy release
[12:53:51] [Octopus Deploy] Octopus Deploy Command Line Tool, version 2.6.3.60
[12:53:51] [Octopus Deploy]
[12:53:52] [Octopus Deploy] Handshaking with Octopus server: http://octopus.autoguru.com.au
[12:53:52] [Octopus Deploy] Handshake successful. Octopus version: 3.13.5; API version: 3.0.0
[12:53:52] [Octopus Deploy] Finding project: Retail
[12:53:52] [Octopus Deploy] Finding deployment process for project: Retail
[12:53:52] [Octopus Deploy] Finding release template…
[12:53:52] [Octopus Deploy] Using version number provided on command-line.
[12:53:52] [Octopus Deploy] Release plan for release: 3.15.0-feature-3076-
[12:53:52] [Octopus Deploy] Steps:
[12:53:52] [Octopus Deploy] # Name Version Source
[12:53:52] [Octopus Deploy] — ------------------------------ --------------- ------------------------------------
[12:53:52] [Octopus Deploy] 1 Deploy www.autoguru.com.au 3.15.0-feature-3076- User specified
[12:53:52] [Octopus Deploy] 2 Deploy api.autoguru.com.au 3.15.0-feature-3076- User specified
[12:53:52] [Octopus Deploy] 3 Deploy admin.autoguru.com.au 3.15.0-feature-3076- User specified
[12:53:52] [Octopus Deploy]
[12:53:52] [Octopus Deploy] Creating release…
[12:53:52] [Octopus Deploy] Error from Octopus server (HTTP 400): There was a problem with your request.
[12:53:52] [Octopus Deploy]
[12:53:52] [Octopus Deploy] - The requested package versions for the following steps violate the channel version rules: Deploy www.autoguru.com.au,Deploy api.autoguru.com.au,Deploy admin.autoguru.com.au. Please specify a different package version, channel or provide the ignoreChannelRules parameter to override this check.
[12:53:52] [Octopus Deploy]
[12:53:52] [Octopus Deploy] Exit code: -7
[12:53:52] [Octopus Deploy] Octo.exe exit code: -7

Turns out I had a dodgy install of the TeamCity plugin. After reinstalling it using the latest version everything is now working correctly.

Hi Anthony,

Glad to hear you figured it out. Also thanks for taking the time to let us know how you managed to fix it :slight_smile:

Cheers!