определение steps.task

Шаг task выполняет задачу.

Все задачи поддерживают следующий набор общих свойств.

steps:
- task: string # Required as first property. Name of the task to run.
  inputs: # Inputs for the task.
    string: string # Name/value pairs
  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:
- task: string # Required as first property. Name of the task to run.
  inputs: # Inputs for the task.
    string: string # Name/value pairs
  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.
steps:
- task: string # Required as first property. Name of the task to run.
  inputs: # Inputs for the task.
    string: string # Name/value pairs
  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.
  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.

Определения, ссылающиеся на это определение: шаги

Свойства

task Строка. Требуется в качестве первого свойства.
Имя выполняемой задачи.

inputs словарь строк.
Входные данные для задачи.

condition Строка.
Оцените это выражение условия, чтобы определить, следует ли выполнять эту задачу.

continueOnErrorлогическое значение.
Продолжить работу даже при сбое?

displayName Строка.
Понятное имя задачи.

targettarget.
Среда, в которой выполняется эта задача.

enabledлогическое значение.
Выполнить эту задачу при выполнении задания?

env словарь строк.
Переменные для сопоставления со средой процесса.

name Строка.
Идентификатор шага. Допустимые значения: [-_A-Za-z0-9]*.

timeoutInMinutes Строка.
Время ожидания завершения этой задачи, прежде чем сервер завершит ее. Например, чтобы настроить время ожидания в 10 минут, используйте .timeoutInMinutes: 10

Примечание

Для конвейеров можно настроить время ожидания на уровне задания. Если интервал времени ожидания на уровне задания истекает до завершения шага, выполняемое задание (включая ваш шаг) завершается, даже если для шага настроен более длительный timeoutInMinutes интервал. Дополнительные сведения см. в разделе Время ожидания.

retryCountOnTaskFailure Строка.
Количество повторных попыток в случае сбоя задачи.

Комментарии

Задачи — это стандартные блоки конвейера. Существует каталог задач, доступных на выбор.

Если режим команд не указан, можно сократить структуру до следующего target :

- task:
  target: string  # container name or the word 'host'

Общие свойства задачи

Все задачи поддерживают набор общих свойств в дополнение к name и inputs. Список общих свойств задачи см. в предыдущем разделе Свойства . Дополнительные сведения о настройке этих свойств см. в разделах Параметры элемента управления задачами и Переменные среды задач.

Узнайте больше об условиях, времени ожидания и целевых показателяхшагов.

Примеры

steps:
- task: VSBuild@1
  displayName: Build
  timeoutInMinutes: 120
  inputs:
    solution: '**\*.sln'

См. также раздел