使用工件类型:fileshare时,发布构建工件步骤失败(TFS 2015) [英] Publish build artifacts step fails, when using Artifact Type : fileshare (TFS 2015)

查看:95
本文介绍了使用工件类型:fileshare时,发布构建工件步骤失败(TFS 2015)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


TFS版本:14.102.25423.0(Tfs2015.Update3)



在我的构建定义中,当我设置  Path  参数


Publish Build Artifacts step




with


工件类型:  文件共享




to


\ VSSALM \ share




在场景后面,这个构建步骤执行一个node.js脚本函数,该函数被递归调用,但是有一个bug,并且该函数在尝试创建drop时反复重复文件夹**。失败的Build代理脚本是


mkdir.js




并且位于构建代理文件夹下面:


agent \tasks \PublishBuildArtifacts \1.0.28 \\\
ode_modules \shelljs \ src \mkdir.js




失败函数的名称是:


mkdirSyncRecursive




错误消息:





- > Stackoverflow当我输入absolut路径时


c:\\\ tespacespace \ share




我收到此错误:


2016-07-23T21:03:07.5727256Z shell.js:内部错误2016-07-23T21:03:07.5727256Z错误:EEXIST:文件已经存在,mkdir'C:\\\\\\\\\\\\\\\\\\\\\\\\\\\




解决方法



当我将drop文件夹设置为(转义的网络共享路径)时:

  \\\\VSALM\\share\\ $(Build.DefinitionName)\\ $(Build.BuildNumber) 



然后构建步骤成功,但文件不会在共享的路径下删除。在我的情况下它们被删除:


C:\ VSALM \ share \ MyBuildDefinition\20160723.7 \ drop




我不知道为什么它不能与我的共享设置为:


C:\ 工作区 \ share




但它在我创建网络共享时起作用


C:\ drop \ share




并在我的构建定义中设置drop文件夹路径,如下所示(转义):

  \\\\drop\\share\\ $(Build.DefinitionName)\\ $(Build.BuildNumber) 



问题: 有人知道如何修复这个mkdir.js脚本吗?




Jovica

解决方案

嗨Jovica,


谢谢你在这里发布。


关于"发布构建工件",如果您为"工件类型"选择"文件共享",则必须为其指定UNC路径。(UNC
路径类似于 \\serverName \ folderName ,路径"C:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ p>


>>然后构建步骤成功但文件不会被删除。


您能否提供有关如何配置构建步骤的屏幕截图?是否为 对米"发布的路径"将是"


(build.artifactstagingdirectory)"或其他路径?


您正在构建什么样的项目/解决方案,Web应用程序或其他类型的项目?


TFS Version: 14.102.25423.0 (Tfs2015.Update3)

In my build definition when I set the Path argument of the

Publish Build Artifacts step

with

Artifact type: File share

to

\VSALM\share

Behind the scene this build step executes a node.js script function which is called recursively, but there is a bug and the function repeats itself over and over again while trying to create the drop folder**. The failing Build agent script is

mkdir.js

and resides below the build agent folder:

agent\tasks\PublishBuildArtifacts\1.0.28\node_modules\shelljs\src\mkdir.js

Name of the failing function is:

mkdirSyncRecursive

The error msg:

016-07-23T21:22:02.3703397Z shell.js: internal error 2016-07-23T21:22:02.3703397Z RangeError: Maximum call stack size exceeded

--> Stackoverflow When I enter an absolut path like

c:\workspaces\share

I get this error:

2016-07-23T21:03:07.5727256Z shell.js: internal error 2016-07-23T21:03:07.5727256Z Error: EEXIST: file already exists, mkdir 'C:\workspaces\share'

Workaround

When I set the drop folder to (escaped network share path):

\\\\VSALM\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)

Then the build step succeeds but the files are not dropped under the path of the share. They are dropped here in my case:

C:\VSALM\share\MyBuildDefinition\20160723.7\drop

I don't know why it doesn't work with my share set to:

C:\workspaces\share

but it works when I create a network share in

C:\drop\share

and set the drop folder path in my build definition like this (escaped):

\\\\drop\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)

Question: Someone knows how to fix this mkdir.js script?


Jovica

解决方案

Hi Jovica,

Thank you for posting here.

About the "Publish Build Artifacts", if you choose "File Share" for the "Artifact Type", you must specify a UNC path for it. (A UNC path is like \\serverName\folderName, the path "C:\workspaces\share" is a local path not a UNC path.)

>>Then the build step succeeds but the files are not dropped.

Could you please give a screenshot about how your build steps configured? Is the value for parameter "Path to Publish" to be "


(build.artifactstagingdirectory)" or other path?

And what kind of project/solution you are building, a web application or other kind of projects?


这篇关于使用工件类型:fileshare时,发布构建工件步骤失败(TFS 2015)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆