Thanks for reaching out, I’d be happy to help with variable references in your deployment process!
Our System Variables documentation mentions all of the variables that are available for Azure, however I find often find it easiest to use our ‘Insert Variable’ tool which will auto populate the details for the desired variable, look for a button next to the script that looks like #{}:
I was able to find the following variables to reference the WebApp Resource Group, Name and Slot in a Run An Azure Script step which is running on a worker on behalf of the target WebApp:
# Resource Group
write-host $OctopusParameters["Octopus.Action.Azure.ResourceGroupName"]
# WebApp Name
write-host $OctopusParameters["Octopus.Action.Azure.WebAppName"]
# WebApp Slot
write-host $OctopusParameters["Octopus.Action[Deploy an Azure App Service].Azure.DeploymentSlot"]
Looking forward to hearing how you get on, feel free to reach out if you have any questions at all!
Finnian, thanks for the reply. I realize now I was attempting to reach back to Step 1 for multiple deployment targets when I needed to add the same “On Behalf of” parameters to Step 2 so it’ll run against the same targets as Step 1.
Please close this ticket, and thanks for the help.