0
votes

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 node.js 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 to:

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

Question: Someone knows how to fix this script?

1
Does the shared folder exist on the build agent?Eddie Chen - MSFT
Yes, the shared folder is on the build agent.Legends
and the shared folder is accessible.Legends

1 Answers

1
votes

"Publish Build Artifacts" task publishes the build output to a shared network path when you select "File Share" type. The "Maximum call stack size exceeded" error usually occurs when the shared network path cannot be found. Please check if the "Path" you entered is correct and can be accessed from the build agent. The format is usually like following:

\\hostnameoripaddress\sharedfolder

When you enter a path with "\\\\" prefix, the task will copy the output to the root of the drive where the build agent located. For example, your build agent work folder is placed in C drive, when you specify "\\\\VSALM\share" as the path, it will copy files to "C:\VSALM\Share" folder(It will create the folder if the path does not exist).