Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using output location that is absolute path that is not underneath working directory #18

Open
dmarklein opened this issue Nov 14, 2016 · 2 comments

Comments

@dmarklein
Copy link

As part of our build process, we copy the resulting artifacts for our build to a separate directory, one that is not a subdirectory of our workspace, and zip them up for publishing. We would like to use this directory as our output location to be uploaded, but when we try to do so, the plugin throws an error because there's an illegal character (":") in the resulting path.

For example, let's say our workspace directory is "C:\Data\build\jenkins\workspace\OurApp", and we output our artifacts to publish to "C:\Data\build\jenkins\published\OurApp". If I configure out Jenkins project to upload and output location of the latter path, it blows up when trying to publish because there's an "Illegal char <:> ... " in the path "C:\Data\build\jenkins\workspace\OurApp\C:\Data\build\jenkins\published\OurApp".

I suspect this is an easy fix, and one I think I could put together a PR for -- is there any reason against adding this support?
Thanks!

@belltimo
Copy link
Contributor

It seems like : characters should be supported, are you able to provide a stack trace so I can see exactly where the issue is? I've made a note of your issue internally so we can investigate it further.

In the interim, is it possible to use a directory inside your workspace for the output artifact? I believe it's quite common to use a directory called something like build or target inside your workspace for this purpose.

@dmarklein
Copy link
Author

dmarklein commented Nov 28, 2016

I do not have a stack trace currently (I will re-configure the job and repro for a stack trace as soon as I can), but to me it certainly looks that the error I see comes from line 209 of CompressionTools.java (here). If outputPath is an absolute path already and not one that is under the workspace, the code tries to concatenate outputPath with the absolute workspace path, yielding a bogus path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants