Unable to delete version-controlled variables in a version-controlled project
Opened this issue · 0 comments
The bug
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:
octopus project variable delete --name test_delete_cli --project "MyProject" --space="Default" --git-ref refs/heads/main
Outcome
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 ):
octopus project variable delete --name test_delete_cli --project "MyProject" --space="Default"
cannot find variable 'test_delete_cli'
Versions
cli: 2.6.0 and earlier
Octopus Server: 2024.3.7046
Links
[Internal] Originally reported in support ticket