huserben / TfsExtensions

Extensions for TFS 2015+ such as custom Widgets (require TFS 2017) and Build Tasks
MIT License
45 stars 22 forks source link

Artifact download causes error if triggered build tags the sources #49

Closed jogotcha closed 6 years ago

jogotcha commented 6 years ago

Hi,

the artifact download causes error if triggered build tags the sources. The build i trigger contains two artifacts, one downloadable and a build.Source label.

2018-02-16T11:16:55.9476350Z Sleeping for 60 seconds...
2018-02-16T11:17:55.9870700Z Build 2808 has completed
2018-02-16T11:17:56.0160775Z Downloading build artifacts to C:\agent\_work\2\a\services
2018-02-16T11:17:56.0170778Z Downloading artifacts for 2808
2018-02-16T11:17:56.0190766Z Directory C:\agent\_work\2\a\services does not exist - will be created
2018-02-16T11:17:56.0520806Z Found 2 artifact(s)
2018-02-16T11:17:56.0520806Z Downloading artifact 3.2.2808.0...
2018-02-16T11:17:56.0600789Z Stored artifact here: C:\agent\_work\2\a\services\3.2.2808.0.zip
2018-02-16T11:17:56.0610790Z Downloading artifact build.SourceLabel...
2018-02-16T11:17:56.0620792Z ##[debug]task result: Failed
2018-02-16T11:17:56.0750966Z ##[error]Parameter "url" must be a string, not undefined
2018-02-16T11:17:56.0750966Z ##[debug]Processed: ##vso[task.issue type=error;]Parameter "url" must be a string, not undefined
2018-02-16T11:17:56.0801173Z ##[debug]Processed: ##vso[task.complete result=Failed;]Parameter "url" must be a string, not undefined

Can you maybe help me out with this? Thanks

huserben commented 6 years ago

Hi @jogotcha

which version of the Task are you using? I quickly tried with the same setup, however the task was successful. It created a zip file of the both artifacts. However the created zip of the SourceLabel was somehow corrupted. But still the task was successful.

I can try to include a check so that not downloadable artifacts will be skipped, that should solve the problem though.

jogotcha commented 6 years ago

@huserben thanks for the feedback.

im on Version 2.5.4. I tried once again, and it seems like the task is only failing if the label is in an git repo. Downloading the artifacts from an TFS repo works fine.

TFS:
2018-02-19T08:24:30.9617100Z Directory C:\agent\_work\7\a\services does not exist - will be created
2018-02-19T08:24:30.9897092Z Found 1 artifact(s)
2018-02-19T08:24:30.9897092Z Downloading artifact build.SourceLabel...
2018-02-19T08:24:30.9977106Z Stored artifact here: C:\agent\_work\7\a\services\build.SourceLabel.zip

GIT:
2018-02-19T08:27:35.5172869Z Directory C:\agent\_work\7\a\services does not exist - will be created
2018-02-19T08:27:35.5543008Z Found 1 artifact(s)
2018-02-19T08:27:35.5543008Z Downloading artifact build.SourceLabel...
2018-02-19T08:27:35.5682811Z ##[error]Parameter "url" must be a string, not undefined
huserben commented 6 years ago

Hi

ok, I will quickly verify this in my environment to see if the fix I have in mind will work as well for that. Then I would be able to rather soon provide a new version. I will let you know once there is an update.

huserben commented 6 years ago

Hi @jogotcha

I now uploaded version 2.5.5 that includes a fix for your problem. Please let me know if it is solved now for you or not in this version.

Thanks for your feedback.

jogotcha commented 6 years ago

Hi @huserben Works perfect now. Thanks for your support!

huserben commented 6 years ago

Ok very good.

Thanks for your feedback again and please do raise further issues when you run into problems :-)