Variable substitution in Email body doesn't work on some

Here is an example of email body we use for notifications -

_#{AppSiteMNM}#{AppVirtualPath} and #{AppSiteLRD}#{AppVirtualPath} deployed on #{Octopus.Environment.Name} _
Version #{Octopus.Release.Number} in folder #{Octopus.Action[Deploy WebAPI].Package.CustomInstallationDirectory} folder.

What we get is -

#{AppSiteMNM}\Loans\Facilities\2.2 and #{AppSiteLRD}\Loans\Facilities\2.2 deployed on WSD-DEV Version 2.2.0.14 in folder #{Octopus.Action[Deploy WebAPI].Package.CustomInstallationDirectory} folder.

AppSiteMNM and AppSiteLRD are our variables and they are defined. Will attach log file of the build.

ServerTasks-64069.log.txt (230.2 KB)

Hi Alex,

Thank you for getting in touch and I’m sorry to hear you are having these issues.

Are the AppSiteMNM and AppSiteLRD scoped variables?

Could you add the OctopusPrintEvaluatedVariables variable with a value of True to your project, create a new release and deploy that and then send through the raw log from that deployment.

Thank you and best regards,
Henrik

Hey Henrik,

  1. The variables are scoped, attached is json file with variables
  2. I flipped OctopusPrintEvaluatedVariables variable with a value of True, zipped log attached

Thanks,
Alex.
wsd-facilitysearch-web-api-v2-2-variables.json (45.1 KB)
ServerTasks-64245.log.zip (216.2 KB)

Hi Alex,

Looking at the server task log I’ve found that there’s a misspelling in the step name you’re trying to get the installation directory from, #{Octopus.Action[Deploy WebAPI].Package.CustomInstallationDirectory} should be #{Octopus.Action[Deploy Web API].Package.CustomInstallationDirectory}.

In regards to the AppSiteMNM and AppSiteLRD variables, I can see that AppSiteMNM is available and successfully replaced in the email body in the server task log, but AppSiteLRD isn’t available so I had a look in the variables file I found that AppSiteMNM is scoped to Tenant Tags SecurityImplementation/Security.Standard and SecurityImplementation/Security.Bypass while AppSiteLRD is only scoped to Tenant Tag SecurityImplementation/Security.Standard

I hope that helps.

Thank you and best regards,
Henrik

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