CopyPublishBuildArtifacts@1 - 複製和發佈組建成品 v1 工作

CopyPublishBuildArtifacts@1已被取代。 請改用 [複製檔案] 工作和 [發行組建成品] 工作。

此工作已被取代。

Syntax

# Copy and Publish Build Artifacts v1
# CopyPublishBuildArtifacts@1 is deprecated. Use the Copy Files task and the Publish Build Artifacts task instead.
- task: CopyPublishBuildArtifacts@1
  inputs:
    #CopyRoot: # string. Copy Root. 
    Contents: # string. Required. Contents. 
    ArtifactName: # string. Required. Artifact Name. 
    ArtifactType: # 'Container' | 'FilePath'. Required. Artifact Type. 
    #TargetPath: '\\my\share\$(Build.DefinitionName)\$(Build.BuildNumber)' # string. Optional. Use when ArtifactType = FilePath. Path. Default: \\my\share\$(Build.DefinitionName)\$(Build.BuildNumber).
# YAML Syntax is not supported in TFS 2018.
# Use the classic designer to add and configure tasks.
# See the following Inputs section for details on the inputs that this task supports.

輸入

CopyRoot - 複製根目錄
string.

應套用檔案比對模式的根資料夾。 如果未提供任何值,則會使用存放庫根目錄。 使用變數來指定存放庫外部的資料夾,例如: $ (Agent.BuildDirectory) 。


Contents - 內容
string. 必要。

要包含在成品中的檔案或資料夾路徑。 支援多行迷你配對模式。 詳細資訊


ArtifactName - 成品名稱
string. 必要。

要建立的成品名稱。


ArtifactType - 成品類型
string. 必要。 允許的值: Container (Server) , FilePath (檔案共用) 。

選擇是否要在 TFS/Team Services 上儲存成品,或將它複製到必須可從組建代理程式存取的檔案共用。


TargetPath - 路徑
string. 選擇性。 使用 時機 ArtifactType = FilePath 。 預設值:\\my\share\$(Build.DefinitionName)\$(Build.BuildNumber)

要複製成品的 UNC 檔案路徑位置。 它必須可從組建代理程式存取。


工作控制選項

除了工作輸入之外,所有工作都有控制選項。 如需詳細資訊,請參閱 控制項選項和一般工作屬性

輸出變數

無。

規格需求

需求 說明
管線類型 YAML,傳統組建
執行于 Agent、DeploymentGroup
要求
Capabilities 此工作不符合作業中後續工作的任何需求。
命令限制 任意
Settable 變數 任意
代理程式版本 1.83.0 或更新版本
工作類別 公用程式