definice steps.task

Krok task spustí úlohu.

Všechny úlohy podporují následující sadu společných vlastností.

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.

Definice, které odkazují na tuto definici: kroky

Vlastnosti

task Řetězec. Požadováno jako první vlastnost.
Název úlohy, která se má spustit.

inputs slovník řetězců.
Vstupy pro úkol.

condition Řetězec.
Vyhodnocením tohoto výrazu podmínky určete, zda se má tato úloha spustit.

continueOnErrorlogická hodnota.
Chcete pokračovat v provozu i při selhání?

displayName Řetězec.
Název úkolu čitelný pro člověka.

targetcíl.
Prostředí, ve kterém se má tato úloha spustit.

enabledlogická hodnota.
Spustit tuto úlohu při spuštění úlohy?

env slovník řetězců.
Proměnné, které se mají mapovat do prostředí procesu.

name Řetězec.
ID kroku Přijatelné hodnoty: [-_A-Za-z0-9]*.

timeoutInMinutes Řetězec.
Doba čekání na dokončení této úlohy, než ji server ukončí. Pokud například chcete nakonfigurovat časový limit 10 minut, použijte .timeoutInMinutes: 10

Poznámka

Kanály můžou být nakonfigurované s časovým limitem na úrovni úlohy. Pokud interval časového limitu na úrovni úlohy uplynou před dokončením kroku, spuštěná úloha (včetně vašeho kroku) se ukončí, i když je krok nakonfigurovaný s delším timeoutInMinutes intervalem. Další informace najdete v tématu Vypršení časových limitů.

retryCountOnTaskFailure Řetězec.
Počet opakovaných pokusů v případě selhání úlohy

Poznámky

Úlohy jsou stavební bloky kanálu. K dispozici je katalog úkolů , ze které si můžete vybrat.

Pokud nezadáte režim příkazu, můžete strukturu zkrátit target na:

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

Společné vlastnosti úlohy

Všechny úkoly podporují kromě name a inputstaké sadu společných vlastností. Seznam běžných vlastností úloh najdete v předchozí části Vlastnosti . Další informace o konfiguraci těchto vlastností najdete v tématech Možnosti řízení úloh a Proměnné prostředí úlohy.

Přečtěte si další informace o podmínkách, časových limitech a cílech kroků.

Příklady

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

Viz také