VSTS Build step Create Octopus Release warns of multiple matching channels

Hennie Gottenbos's Avatar

Hennie Gottenbos

18 Jan, 2018 11:22 AM

I have set up a VSTS build on a Release Branch and was expecting to see Octo.exe select the correct channel based on the version numbers of the packages being created by the build.

The release I am building produces packages with version numbers like 1.0.1.0, 1.0.1.1, 1.0.1.2
The main branch produces packages with version number 1.1.0 and up.

My Octopus project has two channels with Version Rules.

I have set up a Bugfix channel to use a version range of [1.0.1,1.1.0)
I have set up the default channel to use a version range of 1.1

Testing with the Version Rule designer shows Bugfix channel only applies to packages in the specified range so 1.1.0 or 1.1.2 will not be selected while 1.0.1.0, 1.0.2.0 and 1.0.3.3 - for instance - are selected.

Testing with the Version Rule designer shows the default channel only applies to packages in the specified range so 1.1.0.0, 1.1.0.1 etc.

However the Build Step to create the Octopus Release, shows the output included below this post.

I was happy to see in this output that the Bugfix channel was being selected and the correctly version-ed packages being used but to my surprise Octo.exe then goes on to also try and create a Release Plan for the default channel. Subsequently it warns about there being multiple channels and says it will take the default channel.

For the time being I have worked around this issue by explicitly specifying the Bugfix channel and things now work ok.

I am however wondering whether I have completely misconstrued how this should work. Can you shed some light on this?

Thanks!
Hennie.

-----

2018-01-18T09:40:23.1044517Z ##[section]Starting: Create Octopus Release: IMSS
2018-01-18T09:40:23.1049843Z ==============================================================================
2018-01-18T09:40:23.1050120Z Task : Create Octopus Release
2018-01-18T09:40:23.1050344Z Description : Create a Release in Octopus Deploy
2018-01-18T09:40:23.1050581Z Version : 1.2.81
2018-01-18T09:40:23.1050775Z Author : Octopus Deploy
2018-01-18T09:40:23.1051060Z Help : Version: 1.2.81. [More Information](http://docs.octopusdeploy.com/display/OD/Use+the+Team+Foundation+Build+Custom+Task)
2018-01-18T09:40:23.1051359Z ==============================================================================
2018-01-18T09:40:28.7972625Z ##[command]"D:\a\_tasks\OctopusCreateRelease_4e131b60-5532-4362-95b6-7c67d9841b4f\1.2.81\Octo.exe" create-release --project="IMSS" --releaseNumber="" --channel="" --server=https://sonarqube.ictz.nl:444/ --apiKey=******** --enableServiceMessages --deployTo="Development" --releaseNotesFile="d:\a\5\s\release-notes-0498b835-bbb3-4cf0-aaae-1166524253b6.md"
2018-01-18T09:40:28.9444817Z Octopus Deploy Command Line Tool, version 3.4.2+Branch.master.Sha.869d64eaf5d2657a5daadda886a2dd697e2a024c
2018-01-18T09:40:28.9456777Z
2018-01-18T09:40:29.2051685Z Build environment is TeamFoundationBuild
2018-01-18T09:40:29.2200372Z Handshaking with Octopus server: https://sonarqube.ictz.nl:444/
2018-01-18T09:40:30.4587086Z Handshake successful. Octopus version: 3.11.16; API version: 3.0.0
2018-01-18T09:40:30.4806907Z Authenticated as: "Hennie" <"[email blocked]"> ""
2018-01-18T09:40:30.4853365Z This Octopus Server "supports" channels
2018-01-18T09:40:30.4855026Z Finding project: IMSS
2018-01-18T09:40:30.6877183Z Automatically selecting the best channel for this release...
2018-01-18T09:40:30.7239548Z Building a release plan for Channel 'Bugfix'...
2018-01-18T09:40:30.7263317Z Finding deployment process...
2018-01-18T09:40:30.7815082Z Finding release template...
2018-01-18T09:40:30.8554429Z The package version for some steps was not specified. Going to try and resolve those automatically...
2018-01-18T09:40:30.8556096Z Finding latest package for step: "Migrate database"
2018-01-18T09:40:30.9187747Z Selected '"DbMigrate"' version '"1.0.1.3"' for '"Migrate database"'
2018-01-18T09:40:30.9189853Z Finding latest package for step: "Migrate database Local DB"
2018-01-18T09:40:30.9578558Z Selected '"DbMigrate"' version '"1.0.1.3"' for '"Migrate database Local DB"'
2018-01-18T09:40:30.9580144Z Finding latest package for step: "Deploy Web App to Dev and Test"
2018-01-18T09:40:31.0007888Z Selected '"ICTZ.IMS.Statistics"' version '"1.0.1.3"' for '"Deploy Web App to Dev and Test"'
2018-01-18T09:40:31.0009570Z Finding latest package for step: "Deploy to Acceptance or Production VM"
2018-01-18T09:40:31.0400261Z Selected '"ICTZ.IMS.Statistics"' version '"1.0.1.3"' for '"Deploy to Acceptance or Production VM"'
2018-01-18T09:40:31.1708751Z Building a release plan for Channel 'Development'...
2018-01-18T09:40:31.1710365Z Finding deployment process...
2018-01-18T09:40:31.1989514Z Finding release template...
2018-01-18T09:40:31.2596545Z The package version for some steps was not specified. Going to try and resolve those automatically...
2018-01-18T09:40:31.2597905Z Finding latest package for step: "Migrate database"
2018-01-18T09:40:31.3033882Z Selected '"DbMigrate"' version '"1.1.0.47"' for '"Migrate database"'
2018-01-18T09:40:31.3035311Z Finding latest package for step: "Migrate database Local DB"
2018-01-18T09:40:31.3433339Z Selected '"DbMigrate"' version '"1.1.0.47"' for '"Migrate database Local DB"'
2018-01-18T09:40:31.3434825Z Finding latest package for step: "Deploy Web App to Dev and Test"
2018-01-18T09:40:31.3828357Z Selected '"ICTZ.IMS.Statistics"' version '"1.1.0.47"' for '"Deploy Web App to Dev and Test"'
2018-01-18T09:40:31.3829906Z Finding latest package for step: "Deploy to Acceptance or Production VM"
2018-01-18T09:40:31.4255105Z Selected '"ICTZ.IMS.Statistics"' version '"1.1.0.47"' for '"Deploy to Acceptance or Production VM"'
2018-01-18T09:40:31.5070954Z Selected the release plan for Channel 'Development' - there were multiple matching Channels (Bugfix, Development) so we selected the default channel.
2018-01-18T09:40:31.5077257Z Using version number from package step: 1.1.0.47
2018-01-18T09:40:31.5112085Z Release plan for IMSS 1.1.0.47
2018-01-18T09:40:31.5113100Z Channel: 'Development' (this is the default channel)
2018-01-18T09:40:31.5114016Z # Name Version Source Version rules
2018-01-18T09:40:31.5115183Z --- --------------------------------------- ---------- ------------------ -----------------------
2018-01-18T09:40:31.5116419Z 1 Migrate database 1.1.0.47 Latest available Range: PASS Tag: PASS
2018-01-18T09:40:31.5117464Z 2 Migrate database Local DB 1.1.0.47 Latest available Range: PASS Tag: PASS
2018-01-18T09:40:31.5118482Z 3 Deploy Web App to Dev and Test 1.1.0.47 Latest available Range: PASS Tag: PASS
2018-01-18T09:40:31.5119551Z 4 Deploy to Acceptance or Production VM 1.1.0.47 Latest available Range: PASS Tag: PASS
2018-01-18T09:40:31.5120187Z
2018-01-18T09:40:31.5120809Z Creating release...
2018-01-18T09:40:31.6659844Z Error from Octopus server (HTTP 400): There was a problem with your request.
2018-01-18T09:40:31.6661640Z
2018-01-18T09:40:31.6662021Z - Release '1.1.0.47' already exists for this project. Please use a different version, or look at using a mask to auto-increment the number.
2018-01-18T09:40:31.6662551Z
2018-01-18T09:40:31.6662769Z Exit code: -7
2018-01-18T09:40:32.3454753Z ##[error]Process 'Octo.exe' exited with code '-7'.
2018-01-18T09:40:32.3693351Z ##[section]Finishing: Create Octopus Release: IMSS

  1. Support Staff 1 Posted by Dalmiro Grañas on 21 Jan, 2018 05:42 PM

    Dalmiro Grañas's Avatar

    Hi,

    Thanks for reaching out! According to your log you are using the version 1.2.81 of your extension, which was using version 3.4.2 of Octo.exe in the background.

    I'm pretty sure we fixed a couple of bugs around this area in later version of Octo.exe, which should take care of this situation.

    Which version of TFS are you running? I'm asking this because some older versions of TFS are not supported by the latest versions of our extension.

    Thanks,
    Dalmiro

  2. 2 Posted by Hennie Gottenbo... on 22 Jan, 2018 07:16 AM

    Hennie Gottenbos's Avatar

    Hi,

    Thanks for your suggestions. We are using Visual Studio Team Services, hence the latest version of TFS.

    What is the latest version of Octo.exe and how would I go about obtaining it?

    Best regards,
    Hennie.

    From: Dalmiro Grañas [mailto:[email blocked]]
    Sent: zondag 21 januari 2018 18:42
    To: Hennie Gottenbos <[email blocked]>
    Subject: Re: VSTS Build step Create Octopus Release warns of multiple matching channels [Questions #16399]

    // Please reply above this line
    ==================================================

    From: Dalmiro Grañas (Support staff)

    Hi,

    Thanks for reaching out! According to your log you are using the version 1.2.81 of your extension, which was using version 3.4.2 of Octo.exe in the background.

    I'm pretty sure we fixed a couple of bugs around this area in later version of Octo.exe, which should take care of this situation.

    Which version of TFS are you running? I'm asking this because some older versions of TFS are not supported by the latest versions of our extension.

    Thanks,
    Dalmiro

    On Thu, Jan 18 at 03:22 AM PST, Hennie Gottenbos wrote:

    I have set up a VSTS build on a Release Branch and was expecting to see Octo.exe select the correct channel based on the version numbers of the packages being created by the build.

    The release I am building produces packages with version numbers like 1.0.1.0, 1.0.1.1, 1.0.1.2
    The main branch produces packages with version number 1.1.0 and up.

    My Octopus project has two channels with Version Rules.

    I have set up a Bugfix channel to use a version range of [1.0.1,1.1.0)
    I have set up the default channel to use a version range of 1.1

    Testing with the Version Rule designer shows Bugfix channel only applies to packages in the specified range so 1.1.0 or 1.1.2 will not be selected while 1.0.1.0, 1.0.2.0 and 1.0.3.3 - for instance - are selected.

    Testing with the Version Rule designer shows the default channel only applies to packages in the specified range so 1.1.0.0, 1.1.0.1 etc.

    However the Build Step to create the Octopus Release, shows the output included below this post.

    I was happy to see in this output that the Bugfix channel was being selected and the correctly version-ed packages being used but to my surprise Octo.exe then goes on to also try and create a Release Plan for the default channel. Subsequently it warns about there being multiple channels and says it will take the default channel.

    For the time being I have worked around this issue by explicitly specifying the Bugfix channel and things now work ok.

    I am however wondering whether I have completely misconstrued how this should work. Can you shed some light on this?

    Thanks!
    Hennie.

    -----

    2018-01-18T09:40:23.1044517Z ##[section]Starting: Create Octopus Release: IMSS
    2018-01-18T09:40:23.1049843Z ==============================================================================
    2018-01-18T09:40:23.1050120Z Task : Create Octopus Release
    2018-01-18T09:40:23.1050344Z Description : Create a Release in Octopus Deploy
    2018-01-18T09:40:23.1050581Z Version : 1.2.81
    2018-01-18T09:40:23.1050775Z Author : Octopus Deploy
    2018-01-18T09:40:23.1051060Z Help : Version: 1.2.81. [More Information](http://docs.octopusdeploy.com/display/OD/Use+the+Team+Foundation+Build+Custom+Task)

  3. Support Staff 3 Posted by Dalmiro Grañas on 22 Jan, 2018 08:04 PM

    Dalmiro Grañas's Avatar

    Hi,

    Simply go to the extension page in the Marketplace and install the latest version from it. The latest extension will come with the latest version of Octo.exe.

    Let me know how that goes,
    Dalmiro

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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