Pre-release tag

Hi
I’ve three channels: bugfix, feature, and feature-2. each has bugfix, ctb and ctb2 as pre-release tags. Each has different lifecycle and target environment. I am using the following package versioning
bugfix = month.date-build#-bugfix-commit hash (first seven digits). e.g. 2.24-5-bugfix-ea123bc
feature= month.date-build#-ctb-commit hash (first seven digits). e.g. 2.24-6-ctb-47decab
feature-2= month.date-build#-ctb2-commit hash (first seven digits). e.g. 2.24-4-ctb2-eafc34d

at project setting level, generate version numbers using a template is selected by default
(#{Octopus.Version.LastMajor}.#{Octopus.Version.LastMinor}.#{Octopus.Version.NextPatch})

The issue I have is, every time deployment triggered for feature channel, it is taking package either from feature-2 or bugfix. Please advise. I’ve attached sample screenshot

Hi @endashaw.adane,

Thanks for getting in touch!

When you say that each channel has bugfix, ctb and ctb2 as pre-release tags does that mean that Channel: feature has all three of those set as pre-release tags or just ctb?
Would you be able to share a screenshot of the configuration page for this channel showing the Version Rules that you have created?

Regards,
Paul

Hi @paul.calvert ,

Thanks for your prompt response! I mean each has its own pre-release tag. i.e. bugfix has bau, feature has ctb and feature-2 has ctb2.

I think the similar naming of ctb and ctb2 may be causing a problem here. Entering ctb as the tag will allow Octopus to choose any package that has ctb anywhere in the tag, including ctb2.

If you click the Design Rule option in the channel config you can add your own sample versions to the box and test the pre-release tags.
When trying this with your examples the tag ctb shows both packages as valid:

You may need to either change the ctb2 pre-release tag to something else or add some regex to the pre-release tag within the version rule so that it is more specific.
I’m not overly familiar with regex but the following might work:

Channel: feature
Pre-release tag: ctb[^2]

Channel: feature-2
Pre-release tag: ctb[2]

Hi @paul.calvert

Got it now! Thanks!

Regards,

1 Like

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