steps:
- script: |
echo "good"
echo "nice"
这不起作用。它成功打印出“好”,但打印不出好并且显示回显“ nice”,因此最终输出为
good echo 'nice'
我尝试在脚本后删除 | :但还是没有运气。任何想法?我正在ubuntu机器上运行它。
答案 0 :(得分:3)
我得到所需的输出。这是我的管道的样子:
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
echo "good"
echo "nice"
输出:
在评论中回答问题:
这是我将多个参数传递给ARM部署任务的方式:
steps:
- task: AzureResourceManagerTemplateDeployment@3
displayName: "MyDeployment"
inputs:
deploymentScope: "Resource Group"
ConnectedServiceName: ${{ parameters.serviceConnection }}
action: "Create Or Update Resource Group"
resourceGroupName: "$(resourceGroupName)"
location: "$(location)"
templateLocation: "Linked artifact"
csmFile: "$(Pipeline.Workspace)/drop/azuredeploy.json"
overrideParameters: "
-eventGridTopicName myEventGridName
-appServicePlanName myAppServicePlan"
deploymentMode: "Incremental"