【发布时间】:2020-05-02 14:36:53
【问题描述】:
- task: PowerShell@2
displayName: Save Storage account Secrets to Build Variables
inputs:
azureSubscription:
targetType: 'inline'
script: '$outputs = ConvertFrom-Json $($env:STORAGE); foreach ($output in $outputs.PSObject.Properties) { echo $output.Name; echo $output.Value.value; Write-Host ("##vso[task.setvariable variable=$($output.Name);]$($output.Value.value)");}'
- phase: DEVRelease
dependsOn: Build
queue: Hosted Ubuntu 1604
steps:
- task: Kubernetes@1
displayName: Apply Kubernetes Deployment
inputs:
kubernetesServiceEndpoint:
arguments: "-f conf/deploy_local.yaml"
command: apply
azureSubscription:
azureContainerRegistry:
configMapName: myconfig
forceUpdateConfigMap: true
configMapArguments: --from-literal=myname=$($env:STORAGEACCOUNTNAME1)
从不读取 $env:STORAGEACCOUNTNAME 变量
【问题讨论】:
标签: azure kubernetes azure-devops