Share via


steps.publish definíció

A publish kulcsszó olyan fájlokat vagy mappákat tesz közzé (tölt fel) folyamatösszetevőként, amelyeket más feladatok és folyamatok felhasználhatnak.

A publish kulcsszó olyan fájlokat vagy mappákat tesz közzé (tölt fel) folyamatösszetevőként, amelyeket más feladatok és folyamatok felhasználhatnak.

Fontos

A publish lépés csak az Azure DevOps Servicesben támogatott. Ha Azure DevOps Server használja, a Buildösszetevők közzététele funkcióhoz Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. hasonló hibaüzenet jelenik meg, ha Azure DevOps Server használ.

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.

A definícióra hivatkozó definíciók: lépések

Tulajdonságok

publish Karakterlánc. Első tulajdonságként kötelező megadni.
A közzétételi lépés a PublishPipelineArtifact@1 tevékenység parancsikonja. A feladat egy fájlt vagy mappát tesz közzé (feltölt) folyamatösszetevőként, amelyet más feladatok és folyamatok felhasználhatnak.

artifact Karakterlánc.
Összetevő neve.

condition Karakterlánc.
Értékelje ki ezt a feltételkifejezést annak meghatározásához, hogy szeretné-e futtatni ezt a feladatot.

continueOnErrorlogikai érték.
Továbbra is fut hiba esetén?

displayName Karakterlánc.
A feladat emberi olvasásra alkalmas neve.

targetcél.
Környezet, amelyben a feladatot futtatni szeretné.

enabledlogikai érték.
Futtatja ezt a feladatot a feladat futtatásakor?

env sztringszótár.
A folyamat környezetébe leképezési változók.

name Karakterlánc.
A lépés azonosítója. Elfogadható értékek: [-_A-Za-z0-9]*.

timeoutInMinutes Karakterlánc.
Várjon, amíg a feladat befejeződik, mielőtt a kiszolgáló leáll.

Megjegyzés

A folyamatok feladatszintű időtúllépéssel konfigurálhatók. Ha a feladatszint időtúllépési időköze a lépés befejezése előtt eltelik, a futó feladat (beleértve a lépést is) leáll, még akkor is, ha a lépés hosszabb timeoutInMinutes időközzel van konfigurálva. További információ: Időtúllépések.

retryCountOnTaskFailure Karakterlánc.
Az újrapróbálkozások száma, ha a feladat meghiúsul.

Megjegyzések

A publish kulcsszó a Folyamatösszetevő közzététele feladat parancsikonja.

Fontos

A publish lépés csak az Azure DevOps Servicesben támogatott. Ha Azure DevOps Server használja, a Buildösszetevők közzététele funkcióhoz Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. hasonló hibaüzenet jelenik meg, ha Azure DevOps Server használ.

További információ az összetevők közzétételéről.

Példák

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

Lásd még