Using the latest version of the Octopus CLI (2.6.0), it currently isn't possible to use octopus project variables delete and target a version-controlled variable in a version-controlled project.
Command to reproduce
Get the list of version-controlled variables from a version-controlled project
octopus project variables list --project "MyProject" --space "Default" --git-ref "refs/heads/main"
This works, and returns the variables from the specified gitref/branch:
NAME DESCRIPTION VALUE IS PROMPTED ID
test_delete_cli asdf false test_delete_cli-1
Next, attempt to delete the variable from the specified gitref/branch:
It's not possible to specify the --git-ref argument to target the variable in the branch for deletion.
unknown flag: --git-ref
Attempting to delete the variable without a --git-ref argument will not find the variable (which is expected because it's not a local project variable ):
The bug
Using the latest version of the Octopus CLI (
2.6.0
), it currently isn't possible to useoctopus project variables delete
and target a version-controlled variable in a version-controlled project.Command to reproduce
Get the list of version-controlled variables from a version-controlled project
This works, and returns the variables from the specified gitref/branch:
Next, attempt to delete the variable from the specified gitref/branch:
Outcome
It's not possible to specify the
--git-ref
argument to target the variable in the branch for deletion.Attempting to delete the variable without a
--git-ref
argument will not find the variable (which is expected because it's not a local project variable ):Versions
cli: 2.6.0 and earlier
Octopus Server: 2024.3.7046
Links
[Internal] Originally reported in support ticket