Reputation: 675
Straightforward. if you know the Syntax I have googled to no avail, so it may not be possible.
To avoid multiple variable updates, in Octopus I used nested variables I am converting to Azure DevOps Pipeline but cannot find the syntax
Octopus Variables used:-
e.g variable 1 - my.VirtualDirectory, Value - Website2018
variable 2 - TargetDatabasename, Value - #{my.VirtualDirectory}_DB_Checking
variable 3 - TargetDatabasename, Value - #{my.VirtualDirectory}_DB_Checked
the #{} allowed a nested variable, can anyone help with the syntax for Azure DevOps Pipeline?
Upvotes: 0
Views: 1359
Reputation: 72171
its $()
in ADO. same goes for nested: bla-bla-$()-bla
if you are using yaml you can also do this:
- task: AzurePowerShell@3
inputs:
omitted for brievity
Inline: |
${{ format('. $(Build.Repository.LocalPath)\scripts\_helpers.ps1
Update-DeploymentPrereq -resourceGroup {1} -location {3}
Update-Prereq -pathSuffix {0} -pathBase $(Build.Repository.LocalPath) -resourceGroup {1} -buildId $(Build.BuildNumber) -paramFile {2}
Update-DeploymentConcurrency -resourceGroup {1} -buildId $(Build.BuildNumber)',
parameters.buildDir, parameters.resourceGroupName, parameters.paramFile, parameters.location ) }}
azurePowerShellVersion: LatestVersion
Upvotes: 1