【发布时间】:2020-06-29 16:37:08
【问题描述】:
我开始对 yaml 构建失去理智。这是我尝试配置的第一个 yaml 构建,所以我可能犯了一些基本错误。
这是我的 yaml 构建定义:
name: ops-tools-delete-failed-containers-$(Date:yyyyMMdd)$(Rev:.rrrr)
trigger:
branches:
include:
- master
- features/120414-delete-failed-container-instances
schedules:
- cron: '20,50 * * * *'
displayName: At minutes 20 and 50
branches:
include:
- features/120414-delete-failed-container-instances
always: 'true'
pool:
name: Standard-Windows
variables:
- name: ResourceGroup
value: myResourceGroup
stages:
- stage: Delete
displayName: Delete containers
jobs:
- job: Job1
steps:
- task: AzureCLI@2
inputs:
azureSubscription: 'CPA (Infrastructure) (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx)'
scriptType: 'pscore'
scriptLocation: 'scriptPath'
scriptPath: 'General/Automation/ACI/Delete-FailedContainerInstances.ps1'
arguments: '-ResourceGroup $(ResourceGroup)'
简而言之,我想使用 Azure CLI 任务运行脚本。当我排队一个新的构建时,它会永远保持这样:
我尝试使用内联脚本运行相同的任务,但没有成功。如果我尝试运行 Powershell 任务而不是 Azure CLI 任务,也会发生同样的事情。
我在这里错过了什么?
【问题讨论】:
标签: build azure-devops yaml azure-cli