我对构建定义中的Publish Build Artifacts
任务有疑问。将其添加到定义后,它的Paraller Copy
选项设置为8
。更改为4
后,即使恢复了更改,它也自行崩溃了。现在,仅当禁用Paraller Copy
选项时,它才有效。这是日志文件:
******************************************************************************
Starting: Publish Artifact to
******************************************************************************
==============================================================================
Task : Publish Build Artifacts
Description : Publish Build artifacts to the server or a file share
Version : 1.120.1
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=708390)
==============================================================================
robocopy.exe /E /COPY:DA /NP /R:3 /MT:8 "C:\BuildAgent-Publish\_work\1\s\Kdp" "C:\InstallationDataTemp" *
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows :: Version XP010
-------------------------------------------------------------------------------
Started : Tue Oct 15 14:22:25 2019
Source -
Dest -
Files :
Options : /S /E /COPY:DAT /NP /R:3 /W:30
------------------------------------------------------------------------------
ERROR : Invalid Parameter #5 : "/MT:8"
Simple Usage :: ROBOCOPY source destination /MIR
source :: Source Directory (drive:\path or \\server\share\path).
destination :: Destination Dir (drive:\path or \\server\share\path).
/MIR :: Mirror a complete directory tree.
For more usage information run ROBOCOPY /? or read Robocopy.Doc.
NOTE: Read "True Replication" in Robocopy.Doc prior to first use of /MIR !
**** /MIR can DELETE files as well as copy them !
robocopy exit code '16'
Publish build artifacts failed with error: powershell.exe failed with return code: 1
******************************************************************************
Async Command Start: Associate Artifact
******************************************************************************
Associated artifact 22 with build 227
******************************************************************************
Async Command End: Associate Artifact
******************************************************************************
******************************************************************************
Finishing: Publish Artifact to
******************************************************************************
答案 0 :(得分:0)
该版本使用的robocopy版本XP010不支持此参数。
也许您已经进行了其他更改,导致构建在另一个代理上运行。
答案 1 :(得分:0)
虽然robocopy
包含在2003年之后的Windows中,但是唯一需要卸载Windows Resource Kit 2003
以使任务使用最新版本。