steps.publish – definice

Klíčové publish slovo publikuje (nahraje) soubor nebo složku jako artefakt kanálu, který můžou využívat jiné úlohy a kanály.

Klíčové publish slovo publikuje (nahraje) soubor nebo složku jako artefakt kanálu, který můžou využívat jiné úlohy a kanály.

Důležité

Tento publish krok je podporován pouze v Azure DevOps Services. Pokud ho použijete na Azure DevOps Server, zobrazí se chybová zpráva podobná Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. jako Použití artefaktů sestavení publikování, pokud používáte Azure DevOps Server.

steps:
- publish: string # Required as first property. The publish step is a shortcut for the PublishPipelineArtifact@1 task. The task publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume.
  artifact: string # Artifact name.
  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:
- publish: string # Required as first property. The publish step is a shortcut for the PublishPipelineArtifact@1 task. The task publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume.
  artifact: string # Artifact name.
  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:
- publish: string # Required as first property. The publish step is a shortcut for the PublishPipelineArtifact@1 task. The task publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume.
  artifact: string # Artifact name.
  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

publish Řetězec. Povinný argument jako první vlastnost.
Krok publikování je zástupcem úlohy PublishPipelineArtifact@1. Úloha publikuje (nahraje) soubor nebo složku jako artefakt kanálu, který můžou využívat jiné úlohy a kanály.

artifact Řetězec.
Název artefaktu.

condition Řetězec.
Vyhodnoťte tento výraz podmínky a určete, jestli se má tato úloha spustit.

continueOnErrorboolean.
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.

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

env řetězcový slovník.
Proměnné, které se mají mapovat na prostředí procesu.

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

timeoutInMinutes Řetězec.
Je čas počkat na dokončení této úlohy, než ho server ukončí.

Poznámka

Kanály mohou být nakonfigurované s vypršením časového limitu 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čí, a to i v případě, že je krok nakonfigurovaný s delším timeoutInMinutes intervalem. Další informace najdete v tématu Vypršení časových limitů.

retryCountOnTaskFailure Řetězec.
Počet opakování v případě selhání úkolu

Poznámky

Klíčové publish slovo je zástupce pro úlohu Publikovat artefakt kanálu.

Důležité

Tento publish krok je podporován pouze v Azure DevOps Services. Pokud ho použijete na Azure DevOps Server, zobrazí se chybová zpráva podobná Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. jako Použití artefaktů sestavení publikování, pokud používáte Azure DevOps Server.

Přečtěte si další informace o publikování artefaktů.

Příklady

steps:
- publish: $(Build.SourcesDirectory)/build
  artifact: WebApp
  displayName: Publish artifact WebApp

Viz také