Octo.exe looks up variable by "Label" instead of "Name"

I’ve got a prompt variable called prompt.loadData, which instructs our deployment script to load test data into the database.

When I try to do a deployment via octo.exe, the lookup uses the Label instead of the Name. I’ve forked the repo to try and fix it, but it appears as though Octopus.Platform isn’t available to fix (at least I can’t find it).

Essentially, Octopus.Platform.Model.Forms.VariableValue needs to also expose .Name along with .Label. From there, line 145 of DeploymentCommandBase would need to change to

var value = variables.Get(variableInput.Name);

In my script I’m doing a deploy as this.

Octo deploy-release --server=$url --apiKey=$apiKey --project=$_ --deployTo=$environment --version=$version --specificMachines=$specificMachineNames --variable="prompt.loadData:$loadData" --variable="prompt.rebuildDatabase:$rebuildDb"

But since octo.exe is looking at the label, it’s throwing an error.

System.ArgumentException: Please provide a variable for the prompted value Load Data?

at OctopusTools.Commands.DeploymentCommandBase.DeployRelease(ProjectResource project, ReleaseResource release, List`1 environments)
at OctopusTools.Commands.DeployReleaseCommand.Execute()
at OctopusTools.Commands.ApiCommand.Execute(String[] commandLineArguments)
at OctopusTools.Program.Main(String[] args)

Because my label says “Load Data?” whereby my variable name is “prompt.loadData”

I consider this a bug.

Hi Chase,

Thanks for reporting this issue. And great job on providing so much information.
I have created an issue here which you can track: https://github.com/OctopusDeploy/Issues/issues/1534


Thanks, I’ll follow it there.
By chance, is the Octopus.Platform lib OSS for us to patch, or is that an internal project?

Hi Chase,

Sorry no, that is not open source but an internal project.