microsoft / vso-agent

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

Can't upload individual files via "artifact.upload" #263

Closed HSAR closed 8 years ago

HSAR commented 8 years ago

The artifact.upload command works on Windows with both directories and files, but vso-agent on Linux fails on files with "ENOTDIR: not a directory, scandir '$fileToUpload'".

This can immediately be observed in production by starting up a Linux agent, creating a build on VSTS with the "Publish Build Artifacts" task, and targeting a single file. The "Copy and Publish Build Artifacts" task does not suffer from this as it uploads the entire staging directory at once.

satish-chandra commented 8 years ago

+1

I am also facing the same issue. Please do let me know which log files I should attach that can help in debugging the issue.

bryanmacfarlane commented 8 years ago

Please open this issue in the task repo - it's not an agent issue

https://github.com/Microsoft/vso-agent-tasks

TingluoHuang commented 8 years ago

I took a look, it is bug in artifact.upload command handler, we always trade the path input as folder and try to get all files under that folder.

HSAR commented 8 years ago

Any news on this?

bryanmacfarlane commented 8 years ago

Try the newly previewed agent. It doesn't have this bug. As long as you're on the service (visualstudio.com) you can use the new agent. It will preview for on-prem later

https://github.com/Microsoft/vsts-agent

bryanmacfarlane commented 8 years ago

Did the replacement agent work for you? If not, can you open an issue there?

HSAR commented 8 years ago

The replacement agent is working fine, as far as I'm aware.