【发布时间】:2023-04-10 08:49:02
【问题描述】:
我们只有一个管道(我们不能也不想创建第二个管道或使用单独的管道来完成,它必须在同一个管道中完成),该管道具有停止或停止的任务在从库中接受变量组(它是必需的)时启动一个函数(我们在 YAML 上指定那些存储 AE 变量,但它们也存在于库中),并指定 Azure 订阅。目前,我们手动运行这个管道,这是我运行它之前的样子
我正在寻找的功能是自动化此管道以在中部标准时间晚上 7 点运行,并将 start 函数作为任务,接受变量组,并指定我想要的 azure 订阅.然后,在 CST 第二天早上 6 点,我需要使用 SAME 管道来运行以 stop 功能作为任务的构建,接受一个变量组,并指定我想要的 azure 订阅。 我在 CI 管道中找到了一个调度程序功能,但它不允许我从库中指定我想要的变量组,没有选择启动或停止函数的选项,也没有选择订阅的选项。这是我期待看到的
如果有帮助,这就是我拥有的 .YAML 代码(出于隐私目的,某些内容已被删除)
trigger:
- none
pool:
vmImage: 'windows-latest'
parameters:
- name: variableGroup
displayName: Variable Group
type: string
values:
- 'variable for store A'
- 'variable for store B'
- 'variable for store C'
- 'variable for store D'
- 'variable for store E'
- name: artifactVersion
displayName: ArtifactVersion (* (latest) or 1.{sprintNumber}.{ReleaseNo})
type: string
default: '*'
- name: Function
displayName: Function
type: string
default: 'deploy'
values:
- deploy
- name: task
displayName: ExecuteTask
type: string
default: ''
values:
- start thefunction
- stop the function
- name: Subscription
displayName: Subscription
type: string
values:
- 'sandbox'
- 'production '
【问题讨论】:
标签: azure azure-devops continuous-integration yaml