0

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?

1 Answer 1

1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.