小编mak*_*kil的帖子

使用“扩展”的 Azure yaml 管道

我正在尝试使用扩展作为我的管道的一部分。我正在尝试从 Azure 文档开始工作的第一个基本步骤,即

    # pythonparameter-template.yml
    parameters:
    - name: usersteps
      type: stepList
      default: []
    steps:
    - ${{ each step in parameters.usersteps }}
      - ${{ step }}

# azure-pipelines.yml
trigger: none

resources:
  repositories:
  - repository: CI-CD-Templates
    type: git
    name: /CI-CD-Templates
    ref: refs/heads/master

extends:
  template: /pythonparameter-template.yml@CI-CD-Templates
  parameters:
    usersteps:
    - script: echo This is my first step
    - script: echo This is my second step
Run Code Online (Sandbox Code Playgroud)

我不断收到以下错误:

在此上下文中不允许使用指令“每个”。嵌入在字符串中的表达式不支持指令。仅当整个值是表达式时才支持指令 意外值 '${{ each step in parameters.usersteps }} - ${{ step }}'

同样在我从模板扩展之后,azure-pipelines.yml 也有它自己的自定义步骤,即

# azure-pipelines.yml
resources:
  repositories: …
Run Code Online (Sandbox Code Playgroud)

continuous-integration yaml azure continuous-deployment azure-devops

5
推荐指数
1
解决办法
4598
查看次数

无法在 ADO 管道中使用 Install-Module -Name AzureAD 安装 AzureAd 模块

我正在尝试在 ADO 中的 azure powershell 任务中执行 Get-AzureADServicePrincipal。我需要获取服务主体,然后连接以获取 ServicePrincipalId 和 ServicePrincipalkey。作为其中的一部分,我正在尝试以下内容,作为内联脚本

安装模块-名称 AzureAD 获取-AzureADServicePrincipal

但这一直失败,因为

警告:用户拒绝安装模块 (AzureAD)

[错误]术语“Get-AzureADServicePrincipal”未被识别为 cmdlet 的名称

请有人帮忙吗?谢谢

azure azure-devops

4
推荐指数
1
解决办法
3587
查看次数

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

为Windows启动docker会引发“对不受Bitlocker保护的固定驱动器进行拒绝写入访问”

最近,我们对硬盘进行了加密,从那时起,我无法在Windows上使用Docker。每次我为Windows启动Docker时,都会出现以下错误,“当前操作失败,因为Windows策略“拒绝对不受Bitlocker保护的固定驱动器进行写访问”。请禁用它,然后重试该操作”。有没有人遇到过这个问题,并且知道如何解决?是安装Docker Toolbox的唯一选择吗?非常感谢

docker bitlocker

0
推荐指数
1
解决办法
892
查看次数