Why my "packages" are not sorted by time

Hi,
Why my “packages” are not sorted by time, I suspect this issue is causing a publishing error:



Thanks!

Hey Lily,

Thanks for reaching out. “Latest” in Octopus is actually based upon the semver of the package, not the published date. In your case, M in your pre-release tag is considered a newer version than D, which makes it considered newer than the one you just uploaded. It looks like you may be able to resolve this with Package Versioning rules combined with Channels. You would have a channel for Dev that triggers off the pre-release tag Dev, and a channel for MainBranch that triggers off of that pre-release tag.

Please let me know if that helps or if you have any other questions or concerns.

Best,
Jeremy

Jeremy,
I’ve actually configured the channel, but still have this problem.

Hey Lily,

Thanks for confirming that.

At first glance, it should be working how you have it set up. Would you please be able to DM me the full logs from the create-release step as well as the deploy-release step of your pipeline? If you’d like I can DM you a link for a secure upload, or you can email support@octopus.com and reference this ticket. Whichever of the 3 options works best for you.

Looking forward to hearing back.

Best,
Jeremy

Thanks, I need a link for a secure upload.

I’ve DMed you the link, please let me know if you don’t get it.

Hey Lily,

I took a look at your setup and your logs, and I believe you are right in removing Auto Release Creation. We typically don’t recommend people to use this if they have multiple channels as it can cause these sorts of issues.

We do need a new step in your ADO pipeline, though. You will need to add a Create Release octopus step, and fill out all of the required data except for Channel, you will leave that blank. Then you will expand the Additional Options section and we need to add either

--defaultPackageVersion, --packageVersion=VALUE
                             Default version number of all packages to use
                             for this release. Override per-package using --
                             package.

or

      --package=VALUE        [Optional] Version number to use for a package
                             in the release. Format: StepName:Version or
                             PackageID:Version or
                             StepName:PackageName:Version. StepName,
                             PackageID, and PackageName can be replaced with
                             an asterisk. An asterisk will be assumed for
                             StepName, PackageID, or PackageName if they are
                             omitted.

Using one of those, we will tell Octopus the package version for this release, and then Octopus should figure out the correct channel for the release based on that package version. So for example, if you tell it 1.0.2-Dev19, it will automatically figure out it should go to the Default channel, and the same goes for 1.0.2-MainBranch20, it will then figure out the release should be created for the MainBranch channel.

If you want to future proof your pipeline, I recommend the first parameter as the second one needs a bit more specificity. The first one will only work under the assumption that all of the packages used in the process will always have the same version number.

You will then need to change your deploy release steps and add the Additional Option for

--channel=VALUE        [Optional] Name or ID of the channel to use when
                             getting the release to deploy.

This value likely needs to be a variable that changes depending on the package version you’re creating.

Please let me know if you can make those changes and give that a shot and if it works.

I’m looking forward to hearing back.

Best,
Jeremy

Thank you very much ,the problem has been solved.

2 Likes

Hey Lily,

Thanks for letting me know it’s resolved. Please let us know if you run into any snags in the future.

I hope you have a great week.

Best,
Jeremy

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