Sdílet prostřednictvím


steps.publish definition

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

Klíčové slovo publish 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 Serveru, zobrazí se chybová zpráva podobná Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. Použít Publikovat artefakty sestavení, 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.

Definice, které odkazují na tuto definici: kroky

Vlastnosti

publish řetězec. Povinné jako první vlastnost.
Krok publikování je zástupcem úkolu 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.
Vyhodnocení tohoto výrazu podmínky k určení, zda má být spuštěna tato úloha.

continueOnError logických.
Pokračovat i při selhání?

displayName řetězec.
název úkolu čitelný pro člověka.

target cílové.
prostředí, ve kterém chcete tuto úlohu spustit.

enabled logických.
Spustit tuto úlohu při spuštění úlohy?

env řetězcový slovník.
proměnné pro mapování 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 před ukončením serveru.

Poznámka:

Kanály můžou být nakonfigurované s vypršením časového limitu na úrovni úlohy. Pokud časový limit na úrovni úlohy uplynul před dokončením kroku, je spuštěná úloha (včetně kroku) ukončena, 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 opakování, pokud úloha selže.

Poznámky

Klíčové slovo publish je zástupcem úlohy Publikování artefaktu kanálu.

Důležité

Tento publish krok je podporován pouze v Azure DevOps Services. Pokud ho použijete na Azure DevOps Serveru, zobrazí se chybová zpráva podobná Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. Použít Publikovat artefakty sestavení, 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é