Variable Question

Hi,

I see using Octopus 3.7.10 you are able to create variables with the same name, scope and value. In this case it does not matter, but you are able to create variables with the same name and scope with different values. In this case which variable does it use during the deployment ?

Regards,
Avinash

Hi Avinash,

Thanks for getting in touch! Our variable functionality in Octopus is unfortunately not smart enough to know what variable to use in that situation, so I believe it simply selects the first on the list of variables.
We do have a great and thorough blog post that explains how our variable specificity works, its worth looking into. :slight_smile:

Let me know if you have any further questions here. :slight_smile:

Best regards,
Daniel

Hi

Would it be possible to throw an error when publishing a duplicate variable?

Thanks Daniel.

Do you know if this was always the behavior, because If my memory servers me correctly, I do recall that the octopus did some validation when saving the variables?

Regards,
Avinash

Hi Avinash,

Thanks for getting back. I had a look and it doesn’t look like this is something Octopus did in the past. However, I have added as an additional information source to the UserVoice issue that we will be looking into for improving the variables UI.

Let me know if there is anything else I can help you with. :slight_smile:

Best regards,
Daniel