microsoft / vso-agent

Visual Studio Team Services and TFS agent for Mac OSX and Linux
MIT License
132 stars 57 forks source link

Publishing artifacts fails with soft links. #251

Closed buckett closed 6 years ago

buckett commented 8 years ago

We have git repository that we are using with VSO and in our build we attempt to publish all the files that make up the checkout. Contained within this checkout is a soft link. If we attempt to publish the softlink it fails:

Cleaning staging folder: /srv/release_agent/_work/3/a/server
found 609 files
shell.js: internal error
Error: EEXIST: file already exists, symlink '../../../schema/schema.js' -> '/srv/release_agent/_work/3/a/server/client/app/schema/schema.js'
    at Error (native)
    at Object.fs.symlinkSync (fs.js:902:18)
    at cpdirSyncRecursive (/srv/release_agent/_work/tasks/CopyPublishBuildArtifacts/1.0.18/node_modules/shelljs/src/cp.js:76:10)
    at cpdirSyncRecursive (/srv/release_agent/_work/tasks/CopyPublishBuildArtifacts/1.0.18/node_modules/shelljs/src/cp.js:73:7)
    at /srv/release_agent/_work/tasks/CopyPublishBuildArtifacts/1.0.18/node_modules/shelljs/src/cp.js:180:9
    at Array.forEach (native)
    at Object._cp (/srv/release_agent/_work/tasks/CopyPublishBuildArtifacts/1.0.18/node_modules/shelljs/src/cp.js:157:11)
    at Object.cp (/srv/release_agent/_work/tasks/CopyPublishBuildArtifacts/1.0.18/node_modules/shelljs/src/common.js:186:23)
    at Object.cp (/srv/release_agent/_work/tasks/CopyPublishBuildArtifacts/1.0.18/node_modules/vsts-task-lib/task.js:606:15)
    at /srv/release_agent/_work/tasks/CopyPublishBuildArtifacts/1.0.18/copypublishbuildartifacts.js:154:20
Return code: 1

We're running a copy of the agent locally on a Ubuntu Linux server.

buckett commented 8 years ago

I think this might be related to https://github.com/shelljs/shelljs/issues/193

nigurr commented 8 years ago

@buckett Yes, it's the issue with shelljs. Closing this for now. Once shelljs is released with the fix, should be working here

buckett commented 8 years ago

shelljs has a fix: https://github.com/shelljs/shelljs/pull/232 but I think you'll need to change how you're doing the copy.

bryanmacfarlane commented 6 years ago

Deprecated. Replacement is here: https://github.com/Microsoft/vsts-agent