小编hlu*_*osa的帖子

如何从 DevOps 管道安全地登录 Az CLI

我想从我的 Azure DevOps Pipeline 执行 AZ cli 命令。在我的 YAML 文件中,我有这个:

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'

variables:
  buildConfiguration: 'Release'

steps:
- task: UsePythonVersion@0
  inputs:
    versionSpec: '3.x'
    architecture: 'x64'

# Updating pip to latest
- script: python -m pip install --upgrade pip
  displayName: 'Upgrade pip'

# Updating to latest Azure CLI version.
- script: pip install --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge
  displayName: 'upgrade azure cli'

- script: az --version
  displayName: 'Show Azure CLI version'

- script: az extension add -n azure-devops
  displayName: …
Run Code Online (Sandbox Code Playgroud)

azure azure-cli azure-devops azure-pipelines

3
推荐指数
1
解决办法
4669
查看次数

标签 统计

azure ×1

azure-cli ×1

azure-devops ×1

azure-pipelines ×1