steps.reviewApp 定义

此步骤 reviewApp 将 Git 存储库中的每个拉取请求部署到动态环境资源。

steps:
- reviewApp: string # Required as first property. Use this task under deploy phase provider to create a resource dynamically.
  condition: string # Evaluate this condition expression to determine whether to run this task.
  continueOnError: boolean # Continue running even on failure?
  displayName: string # Human-readable name for the task.
  target: string | target # Environment in which to run this task.
  enabled: boolean # Run this task when the job runs?
  env: # Variables to map into the process's environment.
    string: string # Name/value pairs
  name: string # ID of the step.
  timeoutInMinutes: string # Time to wait for this task to complete before the server kills it.
  retryCountOnTaskFailure: string # Number of retries if the task fails.
steps:
- reviewApp: string # Required as first property. Use this task under deploy phase provider to create a resource dynamically.
  condition: string # Evaluate this condition expression to determine whether to run this task.
  continueOnError: boolean # Continue running even on failure?
  displayName: string # Human-readable name for the task.
  target: string | target # Environment in which to run this task.
  enabled: boolean # Run this task when the job runs?
  env: # Variables to map into the process's environment.
    string: string # Name/value pairs
  name: string # ID of the step.
  timeoutInMinutes: string # Time to wait for this task to complete before the server kills it.

引用此定义的定义:步骤

性能

reviewApp 字符串。 必需为第一个属性。
在部署阶段提供程序下使用此任务动态创建资源。

condition 字符串。
计算此条件表达式以确定是否运行此任务。

continueOnError 布尔
即使在失败时继续运行?

displayName 字符串。
任务的人可读名称。

target 目标
运行此任务的环境。

enabled 布尔
作业运行时运行此任务?

env 字符串字典。
变量以映射到进程的环境。

name 字符串。
步骤的 ID。 可接受的值:[-_A-Za-z0-9]*。

timeoutInMinutes 字符串。
等待此任务在服务器终止之前完成的时间。

注释

管道可配置为作业级别超时。 如果作业级别超时间隔在步骤完成之前已过,则运行作业(包括步骤)将终止,即使该步骤配置了更长的 timeoutInMinutes 间隔。 有关详细信息,请参阅 超时

retryCountOnTaskFailure 字符串。
如果任务失败, 重试次数。

注解

reviewApp 关键字是 审阅应用任务的快捷方式。

ReviewApp 将 Git 存储库中的每个拉取请求部署到动态环境资源。 审阅者可以查看这些更改在合并到主分支并部署到生产环境之前如何与其他依赖服务一起使用。 这样可以轻松创建和管理 reviewApp 资源,并受益于环境功能的所有可跟踪性和诊断功能。 通过使用 reviewApp 关键字,可以创建资源的克隆(基于环境中的现有资源动态创建新资源),并将新资源添加到环境中。

有关详细信息,请参阅 Kubernetes 资源 - 在Azure DevOps Sprint 160 中设置评审应用和新增功能。

例子

下面是在环境中使用 reviewApp 的示例 YAML 代码片段。

jobs:
- deployment:
  environment: 
     name: smarthotel-dev      
     resourceName: $(System.PullRequest.PullRequestId) 
  pool:
    name: 'ubuntu-latest'
  strategy:                 
    runOnce:            
      pre-deploy: 
        steps:       
        - reviewApp: MainNamespace

另请参阅