在Azure DevOps发布管道中,我有一个代理作业。在该代理作业中,我有一个Azure Powershell任务。我没有看到一种方法来为Azure Powershell脚本指定环境变量,以便Azure Powershell任务可以运行。
您可以通过简单地为Azure PowerShell任务指定“env”来在构建管道中执行此操作:
您可以通过简单地为Azure PowerShell任务指定“env”来在构建管道中执行此操作:
- task: AzurePowerShell@5
inputs:
azureSubscription: '...'
ScriptType: 'FilePath'
ScriptPath: '...'
ScriptArguments: '...'
FailOnStandardError: true
azurePowerShellVersion: 'LatestVersion'
env:
USERNAME: $(username)
PASSWORD: $(password)
但是我没有看到在发布管道中指定"env"的任何方法:
应该如何完成这个操作?