steps.download 定義
download
步驟會從另一個與管線資源相關聯的 Azure Pipeline 下載與目前執行相關聯的成品。
steps:
- download: string # Required as first property. Specify current, pipeline resource identifier, or none to disable automatic download.
artifact: string # Artifact name.
patterns: string # Pattern to download files from artifact.
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:
- download: string # Required as first property. Specify current, pipeline resource identifier, or none to disable automatic download.
artifact: string # Artifact name.
patterns: string # Pattern to download files from artifact.
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.
參考此定義的定義:步驟
性能
download
字串。 做為第一個屬性的必要屬性。
指定目前、管線資源標識碼或無 ,以停用自動下載。
artifact
字串。
成品名稱。
patterns
字串。
模式,從成品下載檔。
condition
字串。
評估此條件表示式,以判斷是否要執行這項工作。
continueOnError
布林值。
即使在失敗時仍繼續執行?
displayName
字串。
工作的人類可讀取名稱。
target
目標。
要在其中執行這項工作的環境。
enabled
布林值。
作業執行時執行這項工作?
env
字串字典。
變數,以對應至進程的環境。
name
字串。
步驟的標識碼。 可接受的值:[-_A-Za-z0-9]*。
timeoutInMinutes
字串。
等候此工作在伺服器終止之前完成的時間。
備註
管線可能會設定作業層級逾時。 如果作業層級逾時間隔在步驟完成之前經過,即使步驟設定較長的 timeoutInMinutes
間隔,仍會終止執行中的作業(包括您的步驟)。 如需詳細資訊,請參閱 逾時。
retryCountOnTaskFailure
字串。
如果工作失敗,重試次數。
備註
download
關鍵詞會將成品資源下載至 Artifact 下載位置中指定的資料夾,。
根據參考成品的類型(或成品),download
呼叫 下載管線成品(適用於管線成品,如果您的管線是在 Azure DevOps Services 中執行),下載組建成品(適用於組建成品),或 從檔案共享下載成品(適用於檔案共用成品)。
成品下載位置
目前管線中的成品會下載至 $(Pipeline.Workspace)/<artifact name>
。
從相關聯管線資源的成品會下載至 $(Pipeline.Workspace)/<pipeline resource identifier>/<artifact name>
。
在部署作業中自動下載
從目前管線和相關聯管線資源的所有可用成品,都會在部署作業中自動下載,並可供部署使用。
若要防止下載,請指定 download: none
。
範例
steps:
- download: current # refers to artifacts published by current pipeline
artifact: WebApp
patterns: '**/.js'
displayName: Download artifact WebApp
- download: MyAppA # downloads artifacts available as part of the pipeline resource specified as MyAppA