79229660

Date: 2024-11-27 09:39:30
Score: 1
Natty:
Report link

When variables are used from Variable Groups, it is not easy to use template expressions or even macro expressions.

You can try the bellow:

  1. Define a job variable and escape characters \ and "
  2. Use the variable in your task
-job:MyJob
 variables:
    myEscapedSecret: $[replace(replace(variables['STORAGEACCOUNTKEYDBASEBK'], '\', '\\'), '"', '\"')]

 steps:
   -task: xxxxxx
     --storage-key "$(myEscapedSecret)"
Reasons:
  • Has code block (-0.5):
  • Starts with a question (0.5): When
  • Low reputation (1):
Posted by: AarJey