'How can I nest azure pipeline functions?

I want to use multiple functions but when I try I get While parsing a block mapping, did not find expected key.. This is what I have tried:

stages:
  - stage: 'deploy_to_${{ parameters.stage }}'
    displayName: 'Deploy to ${{ replace(upper(parameters.stage), '-', '_') }}'
    dependsOn: ${{ parameters.dependsOn }}
    jobs:
      ...

I also tried ${{ replace(${{ upper(parameters.stage) }}, '-', '_') }} but it just won't let me do both replace() and upper(). What am I doing wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source