steps.publish definition

Słowo publish kluczowe publikuje (przekazuje) plik lub folder jako artefakt potoku, z którego mogą korzystać inne zadania i potoki.

Słowo publish kluczowe publikuje (przekazuje) plik lub folder jako artefakt potoku, z którego mogą korzystać inne zadania i potoki.

Ważne

Ten publish krok jest obsługiwany tylko w Azure DevOps Services. Jeśli używasz go w Azure DevOps Server, zostanie wyświetlony komunikat o błędzie podobny do Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. use Publish Build Artifacts (Użyj artefaktów kompilacji publikowania), jeśli używasz 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.

Definicje odwołujące się do tej definicji: kroki

Właściwości

publish Ciąg. Wymagane jako pierwsza właściwość.
Krok publikowania to skrót do zadania PublishPipelineArtifact@1. Zadanie publikuje (przekazuje) plik lub folder jako artefakt potoku, z którego mogą korzystać inne zadania i potoki.

artifact Ciąg.
Nazwa artefaktu.

condition Ciąg.
Oceń to wyrażenie warunku, aby określić, czy należy uruchomić to zadanie.

continueOnErrorwartość logiczna.
Czy kontynuować działanie nawet w przypadku awarii?

displayName Ciąg.
Czytelna dla człowieka nazwa zadania.

targetelement docelowy.
Środowisko, w którym ma zostać uruchomione to zadanie.

enabledwartość logiczna.
Czy uruchomić to zadanie, gdy zadanie zostanie uruchomione?

env słownik ciągów.
Zmienne do mapowania na środowisko procesu.

name Ciąg.
Identyfikator kroku. Dopuszczalne wartości: [-_A-Za-z0-9]*.

timeoutInMinutes Ciąg.
Czas oczekiwania na ukończenie tego zadania, zanim serwer go zabije.

Uwaga

Potoki można skonfigurować z limitem czasu na poziomie zadania. Jeśli interwał limitu czasu na poziomie zadania upłynie przed ukończeniem kroku, zadanie uruchomione (w tym krok) zostanie zakończone, nawet jeśli krok zostanie skonfigurowany z dłuższym timeoutInMinutes interwałem. Aby uzyskać więcej informacji, zobacz Limity czasu.

retryCountOnTaskFailure Ciąg.
Liczba ponownych prób w przypadku niepowodzenia zadania.

Uwagi

Słowo publish kluczowe to skrót do zadania Publikowanie artefaktu potoku.

Ważne

Ten publish krok jest obsługiwany tylko w Azure DevOps Services. Jeśli używasz go w Azure DevOps Server, zostanie wyświetlony komunikat o błędzie podobny do Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. use Publish Build Artifacts (Użyj artefaktów kompilacji publikowania), jeśli używasz Azure DevOps Server.

Dowiedz się więcej o publikowaniu artefaktów.

Przykłady

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

Zobacz też