Open patrick-smergut-octopus opened 6 months ago
The issue arises when Octopus can not determine the version of an automatically created release. We consider this a configuration issue and will not issue a patch. When a project is configured to "Use the version number from an included package", the step must apply to all channels.
Severity
Impacting one customer, potential to impact others
Version
2024.2.4636
Latest Version
None
What happened?
When a trigger fires, there are 2 areas involved that are used to reference a step to get versioning from a package:
If these aren't both pointing to the same step, the trigger can fail to fire even when the same package is being deployed in the different steps.
This seems to happen primarily when the steps referenced are restricted to a different environment and/or channel than those specified in the trigger.
Reproduction
Upload a test package to the internal feed with a
dev
pre-release tag (e.g.TestPackage.1.0.0-dev.zip
).Create a project with the following:
Deploy a Package
steps that deploy the same package, with each step set to only 'Prod' environment or 'Dev' environment, and correspondingProd
channel andDev
channelProd
channel that uses a prod-only env lifecycle, version rules based on the Deploy a Package only to 'Prod' step, and excludes pre-release tags with^$
Dev
channel that uses a dev-only env lifecycle, version rules based on the 'Deploy a Package' only to 'Dev' step, and pre-release tag matchingdev
Deploy a Package
toProd
step above (note this is a different step than the one used by theDev
channel, but this step references the same package)Configure a trigger to create/deploy a release:
Dev
channel as the channel to create the release inSet the trigger to fire, and when it is processed the below error should be presented.
Error and Stacktrace
More Information
Internal link to repro
First reported here [internal]
Similar to https://github.com/OctopusDeploy/Issues/issues/8736
Workaround
Use the same step in the Project Release Version configuration as the one used in the channel version rule, and make sure the step can run for that channel. For example:
Dev only
, deploy to Environment:Dev
Dev only
channel version rule - Pre-release tag:dev
, Referenced Step:Deploy my custom script
Deploy my custom script
step - Channel:Dev only
, Environment:Dev