Create Octopus Release Task picking up the wrong packages

Hi,

We are using Azure DevOps Services to deploy to Octopus that is hosted on-premise. There is no specific error. But the wrong nuget packages are getting picked up in the Azure Release. We are using Octopus Deploy tasks to push builds to Octopus.

In the Push Packages to Octopus Task two packages are being created:

  • Inventory.Endpoint.2018.10.17.1.nupkg
  • Inventory.Store.Endpoint.2018.10.17.1.nupkg

But in the Create Octopus Release Task the wrong two packages are being picked up:

  • Inventory.Store.Endpoint’ version '20181008.1-qa
  • Inventory.Store.Endpoint’ version '20181008.1-qa

We used a different pattern for naming the packages previously, but this has been changed.
Previously, pattern was: packagenameyearmonthday.rev-qa
But it was changed to the new pattern: packagename.year.month.day.rev

The previous naming pattern worked fine, but I don’t see why the new pattern does work.

How do I get the Create Octopus Release Task to pick up the correct packages?

See below for details. Let me know if there is any other information needed.

Thanks,
Eric

PUSH PACKAGES TO OCTOPUS
2018-10-17T16:28:55.6613534Z ##[section]Starting: Push Packages to Octopus
2018-10-17T16:28:55.6613534Z ==============================================================================
2018-10-17T16:28:55.6613534Z Task : Push Package(s) to Octopus
2018-10-17T16:28:55.6613534Z Description : Push your NuGet or Zip package to your Octopus Deploy Server
2018-10-17T16:28:55.6613534Z Version : 2.0.135
2018-10-17T16:28:55.6613534Z Author : Octopus Deploy
2018-10-17T16:28:55.6613534Z Help : Version: 2.0.135. [More Information]()
2018-10-17T16:28:55.6613534Z ==============================================================================
2018-10-17T16:29:02.1769893Z ##[command]“C:\Agent_work_tasks\OctopusPush_d05ad9a2-5d9e-4a1c-a887-14034334d6f2\2.0.135\Octo.exe” push --server=http://localhost/ --apiKey=******** --package=“C:\Agent_work\r8\a\Inventory\octopack\Inventory.Endpoint.2018.10.17.1.nupkg” --package=“C:\Agent_work\r8\a\Inventory\octopack\Inventory.Store.Endpoint.2018.10.17.1.nupkg”
2018-10-17T16:29:04.6613740Z Octopus Deploy Command Line Tool, version 4.34.0
2018-10-17T16:29:04.6613740Z
2018-10-17T16:29:06.0051198Z Handshaking with Octopus server: http://localhost/
2018-10-17T16:29:06.0051198Z Handshake successful. Octopus version: 3.13.5; API version: 3.0.0
2018-10-17T16:29:06.0363707Z Authenticated as:
2018-10-17T16:29:06.0520279Z Pushing package: C:\Agent_work\r8\a\Inventory\octopack\Inventory.Endpoint.2018.10.17.1.nupkg…
2018-10-17T16:29:06.8957520Z Pushing package: C:\Agent_work\r8\a\Inventory\octopack\Inventory.Store.Endpoint.2018.10.17.1.nupkg…
2018-10-17T16:29:07.4895034Z Push successful
2018-10-17T16:29:07.5676261Z ##[section]Finishing: Push Packages to Octopus

CREATE OCTOPUS RELEASE
2018-10-17T16:29:07.5832519Z ##[section]Starting: Create Octopus Release: Inventory
2018-10-17T16:29:07.5832519Z ==============================================================================
2018-10-17T16:29:07.5832519Z Task : Create Octopus Release
2018-10-17T16:29:07.5832519Z Description : Create a Release in Octopus Deploy
2018-10-17T16:29:07.5832519Z Version : 2.0.135
2018-10-17T16:29:07.5832519Z Author : Octopus Deploy
2018-10-17T16:29:07.5832519Z Help : Version: 2.0.135. [More Information]()
2018-10-17T16:29:07.5832519Z ==============================================================================
2018-10-17T16:29:09.7082595Z ##[command]“C:\Agent_work_tasks\OctopusCreateRelease_4e131b60-5532-4362-95b6-7c67d9841b4f\2.0.135\Octo.exe” create-release --project=“Inventory” --releaseNumber=“2018.10.17.1” --channel="" --server=http://localhost/ --apiKey=******** --enableServiceMessages --deployTo=“qa” --releaseNotesFile=“C:\Agent_work\r8\a\release-notes-ee49693d-62ff-4583-b82c-a58a255ecc74.md”
2018-10-17T16:29:10.5051334Z Octopus Deploy Command Line Tool, version 4.34.0
2018-10-17T16:29:10.5051334Z
2018-10-17T16:29:10.9738814Z Handshaking with Octopus server: http://localhost/
2018-10-17T16:29:10.9738814Z Handshake successful. Octopus version: 3.13.5; API version: 3.0.0
2018-10-17T16:29:10.9895100Z Authenticated as:
2018-10-17T16:29:10.9895100Z This Octopus Server supports channels
2018-10-17T16:29:10.9895100Z Finding project: Inventory
2018-10-17T16:29:11.1145078Z Automatically selecting the best channel for this release…
2018-10-17T16:29:11.1457597Z Building a release plan for Channel ‘Default’…
2018-10-17T16:29:11.1613834Z Finding deployment process…
2018-10-17T16:29:11.2395107Z Finding release template…
2018-10-17T16:29:11.4895111Z The package version for some steps was not specified. Going to try and resolve those automatically…
2018-10-17T16:29:11.4895111Z Finding latest package for step: Deploy Inventory Endpoint
2018-10-17T16:29:11.5363878Z Selected ‘Inventory.Endpoint’ version ‘20181008.1-qa’ for ‘Deploy Inventory Endpoint’
2018-10-17T16:29:11.5363878Z Finding latest package for step: Deploy Inventory Store Endpoint
2018-10-17T16:29:11.5520119Z Selected ‘Inventory.Store.Endpoint’ version ‘20181008.1-qa’ for ‘Deploy Inventory Store Endpoint’
2018-10-17T16:29:11.5520119Z Building a release plan for Channel ‘QA’…
2018-10-17T16:29:11.5520119Z Finding deployment process…
2018-10-17T16:29:11.5676366Z Finding release template…
2018-10-17T16:29:11.6457611Z The package version for some steps was not specified. Going to try and resolve those automatically…
2018-10-17T16:29:11.6770106Z Finding latest package for step: Deploy Inventory Endpoint
2018-10-17T16:29:11.7707644Z Selected ‘Inventory.Endpoint’ version ‘20181008.1-qa’ for ‘Deploy Inventory Endpoint’
2018-10-17T16:29:11.7707644Z Finding latest package for step: Deploy Inventory Store Endpoint
2018-10-17T16:29:11.7863864Z Selected ‘Inventory.Store.Endpoint’ version ‘20181008.1-qa’ for ‘Deploy Inventory Store Endpoint’
2018-10-17T16:29:11.7863864Z Selected the release plan for Channel ‘Default’ - there were multiple matching Channels (Default, QA) so we selected the default channel.
2018-10-17T16:29:11.7863864Z Using version number provided on command-line: 2018.10.17.1
2018-10-17T16:29:11.7863864Z Release plan for Inventory 2018.10.17.1
2018-10-17T16:29:11.7863864Z Channel: ‘Default’ (this is the default channel)
2018-10-17T16:29:11.7863864Z # Name Version Source Version rules
2018-10-17T16:29:11.7863864Z — --------------------------------- --------------- ------------------ -------------------
2018-10-17T16:29:11.7863864Z 1 Deploy Inventory Endpoint 20181008.1-qa Latest available Allow any version
2018-10-17T16:29:11.7863864Z 2 Deploy Inventory Store Endpoint 20181008.1-qa Latest available Allow any version
2018-10-17T16:29:11.7863864Z
2018-10-17T16:29:11.7863864Z Creating release…
2018-10-17T16:29:12.6613911Z Release 2018.10.17.1 created successfully!
2018-10-17T16:29:12.6770190Z setParameter name=‘octo.releaseNumber’ value=‘2018.10.17.1’
2018-10-17T16:29:13.1926403Z Deploying Inventory “2018.10.17.1” to: qa (Guided Failure: Not Enabled)
2018-10-17T16:29:13.2395174Z ##[section]Finishing: Create Octopus Release: Inventory

Hi Eric, thanks for reaching out.

I would like to clarify my understanding of the issue you are facing. From the description it sounds like you previously deployed packages like Inventory.Store.Endpoint.20181008.1-qa.nupkg. Now you are deploying packages like Inventory.Store.Endpoint.2018.10.17.1.nupkg. But the new packages are not being deployed by Octopus.

If my understanding is correct then the issue is that version 2018.10.17.1 is considered to be earlier than 20181008.1. You can see this with the online semver checking tool at http://semvercompare.azurewebsites.net/?version=2018.10.17&version=20181008.

As you can see in the screenshot below, version 20181008 is considered to be the highest version.

By default Octopus will select the package with the highest version when creating a release, which means that even though a package like Inventory.Store.Endpoint.2018.10.17.1.nupkg was the last one added to the library, package Inventory.Store.Endpoint.20181008.1-qa.nupkg is still the latest version.

To work around this you can use channels, which are documented at https://octopus.com/docs/deployment-process/channels. You can use a channel version rule like [,20180101) to include packages up to but not including 20180101.

Regards
Matt C

Hi Matthew,

Thanks for pointing me in the right direction. I was able to solve the problem.

Eric

That is great new Eric, thanks for letting me know.

Regards
Matt C

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