Re: File as parameter not working

2016-06-08 Thread sivarajesh jarugula
Hi Jonathan, I got a question related to your post. I have a requirement to browse a directory (which is multiple files and sub directories) instead of a file (which is done by File parameter plugin). I know with string parameter, I can ask user to give the path of the directory. But this is er

Re: File as parameter not working

2016-05-23 Thread Jonathan Hodgson
For the record, I got around this by using a string parameter. It's a bit of a rigmarole, since I have to escape the diff to use it as a string parameter, and then write that string to a file before using it in Hg Patch (it may be possible to skip that step if I can work out how to pass it vias

Re: File as parameter not working

2016-05-19 Thread Jonathan Hodgson
The problem is, right now I'm not getting it to the build... but the idea is that the diff is generated locally and a build started by a local command line script, along the lines of this... https://codeascraft.com/2011/10/11/did-you-try-it-before-you-committed/ It looks like one possibility is

Re: File as parameter not working

2016-05-19 Thread Brian Ray
Gotcha, did not follow how you were getting it across to the build. On Thursday, May 19, 2016 at 4:15:06 AM UTC-7, Jonathan Hodgson wrote: > > The remote machine currently isn't sharing the file, that's part of the > point of uploading it in the http POST, sorting out a share seems like it > wou

Re: File as parameter not working

2016-05-19 Thread Jonathan Hodgson
The remote machine currently isn't sharing the file, that's part of the point of uploading it in the http POST, sorting out a share seems like it would be an issue, it needs to be dynamic. On Thursday, May 19, 2016 at 2:25:47 AM UTC+1, Brian Ray wrote: > > Sorry, the API was URL#withInputStream,

Re: File as parameter not working

2016-05-18 Thread Brian Ray
Sorry, the API was URL#withInputStream, not #withReader. On Wednesday, May 18, 2016 at 6:24:11 PM UTC-7, Brian Ray wrote: > > Aha. Pipeline's under heavy development so unfortunately, there are gaps > like this. > > How's the remote machine sharing the file? Windows directory share, e.g.? > > Dep

Re: File as parameter not working

2016-05-18 Thread Brian Ray
Aha. Pipeline's under heavy development so unfortunately, there are gaps like this. How's the remote machine sharing the file? Windows directory share, e.g.? Depending on the type of file and how it's shared will likely determine the strategy. I had no success getting a pipeline script to use t

Re: File as parameter not working

2016-05-18 Thread Jonathan Hodgson
Thanks, What I've found so far also seems to indicate there is an issue with File Parameters in Pipeline plugins. If that's the case then it really begs the question as to why they're an option on the pipeline project setup page. I'm having trouble seeing how I'm going to do what I need to do t

Re: File as parameter not working

2016-05-18 Thread Brian Ray
Not 100% sure but I suspect that Pipeline job params can only be "regular" String parameters and perhaps param types whose values easily resolve to strings. My gut instinct is that more exotic param types that have side effects--like the File type--will not work. So in the current use case the

Re: File as parameter not working

2016-05-18 Thread Jonathan Hodgson
Ok, I tried creating two projects, one a freestyle job, the other a pipeline. The only thing I set up in each was a file as parameter. I ran a "Build using parameters" selecting the same file to upload. When I tried to view the file in the freestyle job, it worked, but in the pipeline job I g

Re: File as parameter not working

2016-05-17 Thread Jonathan Hodgson
I've been experimenting, and if I do what appears to be exactly the same thing with a Freestyle project, file upload is successful. I can't state yet whether the freestyle/pipeline job difference coinciding with a failure to upload the file is a coincidence, or the deciding factor. -- You rece

File as parameter not working

2016-05-17 Thread Jonathan Hodgson
Hi, I'm running Jenkins on Debian, still very new to it. I'm currently trying to set up a pipeline job... just a test one so I can make sure the structure I have in mind works. Anyway, part of the requirement is to upload a file, so I've made the build parameterized, and added a "File as Param