【发布时间】:2020-08-27 22:53:39
【问题描述】:
我在 Azure DevOps YAML 管道中编写了一个 Azure PowerShell 任务,如下所示
- task: AzurePowerShell@3
displayName: 'Invoke Test'
inputs:
azureSubscription: 'subscriptionname'
ScriptPath: '$(Build.SourcesDirectory)\ProjectName\Scripts\Build\TestRelease.ps1'
ScriptArguments: -testfilepath '$(Build.SourcesDirectory)\ProjectName\Releases\test.json -JsonFilepath '$(Build.SourcesDirectory)\test\qa\test_qa.json' -AzuredevopsService $(AzuredevopsService) -Verbose
azurePowerShellVersion: LatestVersion
即使管道作业成功执行,上述 PowerShell 任务也没有执行并获取如下所示的日志。当我从经典编辑器管道调用时,相同的 PowerShell 脚本正在运行
## Initializing Azure Complete
## Beginning Script Execution
& 'C:\devops\vsts-agent-win-x64-2.154.3\_work\10\s\ProjectName\Scripts\Build\TestRelease.ps1' -testfilepath 'C:\devops\vsts-agent-win-x64-2.154.3\_work\10\s\ProjectName\Releases\test.json' -JsonFilepath 'C:\devops\vsts-agent-win-x64-2.154.3\_work\10\s\test\qa\test_qa.json' -AzuredevopsService https://test.azure.com -organisation OrgName -Verbose
## Script Execution Complete
【问题讨论】:
标签: build azure-devops yaml devops release