definição steps.publish

O publish palavra-chave publica (carrega) um arquivo ou pasta como um artefato de pipeline que outros trabalhos e pipelines podem consumir.

O publish palavra-chave publica (carrega) um arquivo ou pasta como um artefato de pipeline que outros trabalhos e pipelines podem consumir.

Importante

A publish etapa tem suporte apenas em Azure DevOps Services. Se usá-lo em Azure DevOps Server, você receberá uma mensagem de erro semelhante a Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. Usar Publicar Artefatos de Build se estiver usando 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.

Definições que fazem referência a essa definição: etapas

Propriedades

publish String. Obrigatório como primeira propriedade.
A etapa de publicação é um atalho para a tarefa PublishPipelineArtifact@1. A tarefa publica (carrega) um arquivo ou pasta como um artefato de pipeline que outros trabalhos e pipelines podem consumir.

artifact String.
Nome do artefato.

condition String.
Avalie essa expressão de condição para determinar se essa tarefa deve ser executada.

continueOnErrorbooliano.
Continuar em execução mesmo em caso de falha?

displayName String.
Nome legível para a tarefa.

targetdestino.
Ambiente no qual executar essa tarefa.

enabledbooliano.
Executar essa tarefa quando o trabalho for executado?

env dicionário de cadeia de caracteres.
Variáveis a serem mapeadas para o ambiente do processo.

name String.
ID da etapa. Valores aceitáveis: [-_A-Za-z0-9]*.

timeoutInMinutes String.
Tempo de espera para que essa tarefa seja concluída antes que o servidor a mate.

Observação

Os pipelines podem ser configurados com um tempo limite de nível de trabalho. Se o intervalo de tempo limite do nível do trabalho decorrer antes da conclusão da etapa, o trabalho em execução (incluindo a etapa) será encerrado, mesmo que a etapa esteja configurada com um intervalo mais longo timeoutInMinutes . Para obter mais informações, consulte Tempos limite.

retryCountOnTaskFailure String.
Número de novas tentativas se a tarefa falhar.

Comentários

A palavra-chave publish é um atalho para a tarefa Publicar Artefato de Pipeline.

Importante

A publish etapa tem suporte apenas em Azure DevOps Services. Se usá-lo em Azure DevOps Server, você receberá uma mensagem de erro semelhante a Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. Usar Publicar Artefatos de Build se estiver usando Azure DevOps Server.

Saiba mais sobre como publicar artefatos.

Exemplos

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

Confira também