Overwriting variables not working suddenly

Suddenly prompted variable overwrite doesnt work from octo.exe (v7.4.1) and TeamCity (v6.0.1).
Facts:

  • Variables marked as ‘prompt’

  • Variables not scoped

  • Tried with both no default and default value

  • Tried both with TeamCity and octo.exe

  • Tried with both the -v and --variable syntax

  • This has been working previously on some of the projects.

Using OD v. 2020.2.13 - Any input on how to troubleshoot? I’ve tried to add verbose logging to octo.exe to see if it should output which variables it found and will overwrite - but I see nothing.
Any input is greatly appreciated.

Syntax:
octo create-release -v BuildNumber:123 --server=https://octopus.xx/api --apikey=API-xxx --project=AA --logLevel=verbose --version="20200819.0.544-master19.7eb8c2cc5c1-ReattachRedeploy" --channel="Re-attach AKS Cluster and Re-deploy Webservice" --package=AAAMlWebService:"20200819.0.544-master.7eb8c2cc5c1"

Hey Jasper,

Thanks for reaching out and all the information. I’m gonna dig in and try to reproduce the issue. I’ll keep you updated on my results.

Please feel free to reach out in the meantime with any more information, questions, or concerns.

Thanks,
Jeremy

Hey Jasper,

I think I’ve found the issue here. If you take a look at our documentation for octopus CLI, this parameter only applies to the “Deployment” section. This parameter will only get parsed if you’re actually deploying the release via the same command with --deployto.

Please let me know if that makes sense or if you need more help on this.

Thanks,
Jeremy

Hi Jeremy,

Guess that makes sense, since this feature only works with prompted variables. Thanks for clearing this up.

Hey Jasper,

You’re very welcome.

If you’re looking to modify unprompted project variables I have written a script over in our repository that can do that. It wont be a simple CLI, but it may help anyway. https://github.com/OctopusDeploy/OctopusDeploy-Api/blob/master/REST/PowerShell/Variables/ModifyOrAddVariableToProject.ps1

I hope you have a great rest of your week and please let me know if you have any questions about the above script.

Thanks,
Jeremy

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.