steps.publish-definition

Nyckelordet publish publicerar (laddar upp) en fil eller mapp som en pipelineartefakt som andra jobb och pipelines kan använda.

Nyckelordet publish publicerar (laddar upp) en fil eller mapp som en pipelineartefakt som andra jobb och pipelines kan använda.

Viktigt

Steget publish stöds endast i Azure DevOps Services. Om du använder den på Azure DevOps Server får du ett felmeddelande som liknar Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. Använd publicera byggartefakter om du använder 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.

Definitioner som refererar till den här definitionen: steg

Egenskaper

publish Sträng. Krävs som första egenskap.
Publiceringssteget är en genväg för PublishPipelineArtifact@1 uppgift. Uppgiften publicerar (laddar upp) en fil eller mapp som en pipelineartefakt som andra jobb och pipelines kan använda.

artifact Sträng.
Artefaktnamn.

condition Sträng.
Utvärdera villkorsuttrycket för att avgöra om den här aktiviteten ska köras.

continueOnErrorbooleskt värde.
Vill du fortsätta köra även vid fel?

displayName Sträng.
Läsbart namn för uppgiften.

targetmål.
Miljö där den här uppgiften ska köras.

enabledbooleskt värde.
Kör du den här uppgiften när jobbet körs?

env strängordlista.
Variabler som ska mappas till processens miljö.

name Sträng.
ID för steget. Acceptabla värden: [-_A-Za-z0-9]*.

timeoutInMinutes Sträng.
Det är dags att vänta tills den här uppgiften har slutförts innan servern avslutar den.

Anteckning

Pipelines kan konfigureras med en tidsgräns på jobbnivå. Om tidsgränsintervallet på jobbnivå förflutit innan steget har slutförts avslutas det jobb som körs (inklusive ditt steg), även om steget har konfigurerats med ett längre timeoutInMinutes intervall. Mer information finns i Timeouter.

retryCountOnTaskFailure Sträng.
Antal återförsök om aktiviteten misslyckas.

Kommentarer

Nyckelordet publish är en genväg för uppgiften Publicera pipelineartefakt.

Viktigt

Steget publish stöds endast i Azure DevOps Services. Om du använder den på Azure DevOps Server får du ett felmeddelande som liknar Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. Använd publicera byggartefakter om du använder Azure DevOps Server.

Läs mer om att publicera artefakter.

Exempel

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

Se även