Create Release --package=VALUE - Unable to include `/` in package name in value
The bug
When running the create-release command, the package version isn't able to include a package name with a /
A workaround is to use --packageVersion to set the default package version, however this isn't suitable for deployments that reference other packages without manually including version for each of the referenced packages.
Alternatively using the format StepName:Version or an asterisk can be used.
Both StepName:PackageName:Version and PackageID:Version are effected by this:
--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.
Command to reproduce
- Configure an Octopus Project to deploy a package that includes a
/in it's name (e.g. a docker container) - Run a create release command that specifies the version for the package:
octo create-release --project myProject --version 0.0.1 --package "octopusdeploy/tentacle:5.2.0-ubuntu.22.04"
octo create-release --project myProject --version 0.0.1 --package "Run a Script:octopusdeploy/tentacle:5.2.0-ubuntu.22.04"
Outcome
The following line is logged:
The package version for some steps was not specified. Going to try and resolve those automatically...
And the latest package version used instead of the version specified.
Versions
cli: Octopus CLI, version 9.1.7
Octopus Server: 2023.4.4798
Links
The Octopus engineering team has reviewed this issue.
After careful consideration, we've classed this low priority. This means we won't work on it in the near future.
We prioritize issues based on the number of people affected, the impact type, and available workarounds.
If you've encountered this issue and haven't informed our support team, please email [email protected]. Knowing how many people this issue affects helps us determine its priority.
btw @FinnianDempsey - I note that in your bug report you reference Octopus CLI 9.1.7, which is not this tool.
Rather, that's the older C# CLI over here
The other giveaway is the executable you reference is octo; This tool is octopus
(Both old and new CLI's suffer from the same problem, so this is mostly academic, but good to clarify anyway)
This has been fixed in Octopus Server 2024.3.1246, see https://github.com/OctopusDeploy/Issues/issues/8818
it's still not working @FinnianDempsey, details:
Cloud server version: v2025.2 (Build 1694) - 2025.2.1694
➜ ~ octopus version
2.15.3
➜ ~ octopus release create --project Graylog --git-ref master --package 'graylog/graylog:6.1.7' --version test
Project Graylog
Git Reference master
Selecting only available channel 'Default'.
PACKAGE VERSION STEP NAME/PACKAGE REFERENCE
mongo 8.0.5 Terraform/DockerMongoDB.Image
graylog/graylog 6.2.0-alpha.2-1 Terraform/DockerGraylog.Image
? Package override string (y to accept, u to undo, ? for help):
As you can see, the package version 6.1.7 is ignored. But when I install the package version for the mongo docker image, everything is fine:
➜ ~ octopus release create --project Graylog --git-ref master --package 'mongo:3.1.8' --version test
Project Graylog
Git Reference master
Selecting only available channel 'Default'.
PACKAGE VERSION STEP NAME/PACKAGE REFERENCE
mongo 3.1.8 Terraform/DockerMongoDB.Image
graylog/graylog 6.2.0-alpha.2-1 Terraform/DockerGraylog.Image
? Package override string (y to accept, u to undo, ? for help):
@3guboff Typically reference packages use the Step name and Package Reference, which looks to be required for packages that include a /, the following format should work:
octopus release create --project Graylog --git-ref master --package 'Terraform/DockerGraylog.Image:6.1.7'
(also worth double checking the channel version rules allow for that package format to be used)
Hey @FinnianDempsey , you are right, it's working with {package-ref-name}:{packageOrStep}:{version} (as expected). But also it must work (with is not) with {package}:{version} based on documentation:
➜ ~ octopus release create --help
...
--package stringArray Version specification for a specific package.
Format as {package}:{version}, {step}:{version} or {package-ref-name}:{packageOrStep}:{version}
You may specify this multiple times
...
Great to hear @3guboff!
The wording is definitely a little odd but I believe it's indicating that for packages 2 formats are available ({package}:{version}, {step}:{version}) however for referenced packages there is the other format available ({package-ref-name}:{packageOrStep}:{version}) but unfortunately you won't be able to use both formats for both types of packages that a step can have.
e.g. packages OR referenced-packages
Format as {package}:{version}, {step}:{version} OR {package-ref-name}:{packageOrStep}:{version}