Hi Team,
I have few variables in ram yaml files which I am publishing from octopus deploy raw yaml template.
variables are not getting transformed even though I created in variables section
Hi Team,
I have few variables in ram yaml files which I am publishing from octopus deploy raw yaml template.
variables are not getting transformed even though I created in variables section
Thanks for getting in touch!
Unlike our Substitute Variables in Templates feature where you define the value as an Octopus variable name the Structured Configuration Variables feature used with YAML instead targets the actual field names and that is what your variable names need to match.
For example, your authscope
variable within Octopus would need to be changed to metadata:labels:auth-issuer
If you give that a try and let me know if you run into further problems.
Regards,
Paul
Thanks Paul , i added the correct step now and the variables getting substituted but the package version is not getting substituted. am I missing anything
Just jumping in for Paul while he’s offline.
Try changing the Packageversion
variable to [Octopus.Action.Package[sample-web-api2].Version]
instead. Our docs about System Variables mention which variables to use when referencing packages:
https://octopus.com/docs/projects/variables/system-variables#reference-package-variables
A useful trick I find for debugging variables is to print them out to the Task logs to see exactly what’s being used:
https://octopus.com/docs/support/how-to-turn-on-variable-logging-and-export-the-task-log
Let us know if that doesn’t help or you have any questions at all!
Best Regards,
Thanks for the suggestion, printing variables is very helpful for troubleshooting.
when I changed to version, It still did not replace.
It isn’t clear why this isn’t working for you. Can you send us the full task log for that deployment to review?
I appreciate that you may not want it publicly added here, so if you email it through to support@octopus.com we can pick it up there.
If you could also include a link to this topic in the email.
Regards,
Paul
Sent the complete log to the support email with the issue number in the subject.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.