Prompt Variable used in building a custom package id

Hi,

We are using Octopus 3.3.27 and Team City in our build and release management process.

I managed to use a variable in order to define a custom expression in a package id and it works Ok as long as that variable is not declared as a prompt variable and passed from Team City via a parameter in the octo.exe command line.

When the variable is given a value in octopus it works if the value comes through a prompt no value is to the custom expression in the package id.

If:

Passing parameter from Team city: -v=Suffix:myFlavour

In Octopus:
variable defined as prompt with both the name and Label Suffix
Custom expression in the Nuget Package Id: MyApp.#{Suffix}
Fails trying to find the package with the id: MyApp.

If:

In Octopus:
Variable defined with name Suffix and with value myFlavour
Custom expression in the Nuget Package Id: MyApp.#{Suffix}
Works and it finds the latest version of the package with the id: MyApp.myFlavour

Is this expected behaviour?
Is there a difference between the prompt variable and the non prompt variable in this context?

Hi,

Thanks for getting in touch! This is actually the expected behavior. This is because you provide values for prompted variables at deployment time, where your package ID needs to be defined at release creation time. Using a standard variable like you have done works as it’s defining it at release creation.

Sorry it’s not better news! Don’t hesitate to reach out if you have any further questions.

Best regards,

Kenny