Share via


steps.publish definition

La publish parola chiave pubblica (carica) un file o una cartella come artefatto della pipeline che possono essere usati da altri processi e pipeline.

La publish parola chiave pubblica (carica) un file o una cartella come artefatto della pipeline che possono essere usati da altri processi e pipeline.

Importante

Il publish passaggio è supportato solo in Azure DevOps Services. Se lo si usa in Azure DevOps Server, verrà visualizzato un messaggio di errore simile all'uso Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. di Pubblica artefatti di compilazione se si usa 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.

Definizioni che fanno riferimento a questa definizione: passaggi

Proprietà

publish Stringa. Obbligatorio come prima proprietà.
Il passaggio di pubblicazione è un collegamento per l'attività PublishPipelineArtifact@1. L'attività pubblica (carica) un file o una cartella come artefatto della pipeline che altri processi e pipeline possono utilizzare.

artifact Stringa.
Nome dell'artefatto.

condition Stringa.
Valutare questa espressione di condizione per determinare se eseguire questa attività.

continueOnErrorbooleano.
Continuare l'esecuzione anche in caso di errore?

displayName Stringa.
Nome leggibile per l'attività.

targetdestinazione.
Ambiente in cui eseguire questa attività.

enabledbooleano.
Eseguire questa attività quando viene eseguito il processo?

env dizionario stringa.
Variabili di cui eseguire il mapping nell'ambiente del processo.

name Stringa.
ID del passaggio. Valori accettabili: [-_A-Za-z0-9]*.

timeoutInMinutes Stringa.
Tempo di attesa del completamento dell'attività prima che il server lo completi.

Nota

Le pipeline possono essere configurate con un timeout a livello di processo. Se l'intervallo di timeout a livello di processo è trascorso prima del completamento del passaggio, il processo in esecuzione (incluso il passaggio) viene terminato, anche se il passaggio è configurato con un intervallo più lungo timeoutInMinutes . Per altre informazioni, vedere Timeout.

retryCountOnTaskFailure Stringa.
Numero di tentativi se l'attività ha esito negativo.

Commenti

La publish parola chiave è un collegamento per l'attività Pubblica artefatto pipeline.

Importante

Il publish passaggio è supportato solo in Azure DevOps Services. Se lo si usa in Azure DevOps Server, verrà visualizzato un messaggio di errore simile all'uso Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. di Pubblica artefatti di compilazione se si usa Azure DevOps Server.

Altre informazioni sulla pubblicazione degli artefatti.

Esempi

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

Vedere anche