我想让我的参数大写
parameters:
#Relative path to the BuildDirectory where artifacts are stored
artifactLocation : ''
env : ''
serviceConnectionName: ''
subscriptionId: ''
#Arguments String to be used for the ADF deployment
argumentsString: ''
datafactoryName: ''
resourceGroupName: ''
location: ''
jobs:
- deployment: DeploymentJob
displayName: 'Deploying Azure Data Factory'
pool:
name: $(agentPoolName)
environment: "EMEA_${{ parameters.env.ToUpper() }}_MDP"
我收到此错误:
意外符号:'('。位于表达式中的第 23 位:parameters.env.ToUpper()
什么是正确的语法?
我也尝试过这种方法
parameters:
# Relative path to the BuildDirectory where artifacts are stored
artifactLocation: ''
env: ''
serviceConnectionName: ''
subscriptionId: ''
# Arguments String to be used for the ADF deployment
argumentsString: ''
datafactoryName: ''
resourceGroupName: ''
location: ''
variables:
env_upper: ${{ upper(parameters.env) }}
jobs:
- deployment: DeploymentJob
displayName: 'Deploying Azure Data Factory'
pool:
name: $(agentPoolName)
environment: 'EMEA_${{ variables.env_upper }}_MDP'
错误说它没有表达变量
我也尝试过这种方法:
environment: 'EMEA_${{ upper(parameters.env) }}_MDP'
这并没有引发错误,但没有变成大写。
而不是:
尝试:
请参阅表达式来获取表达式和函数的完整列表。