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 though, 
because the file has to be provided from a remote machine in the build 
call.. it's a diff file, I need to achieve a "try before commit".

As I said, I'm rather new to Jenkins.

On Wednesday, May 18, 2016 at 5:14:37 PM UTC+1, Brian Ray wrote:
>
> 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 straightforward workaround would be to use 
> a String parameter to specify a filesystem path or URI, and then have the 
> Pipeline script place it in the workspace. There may be Pipeline-friendly 
> plugins that could do this for you as well, though they are not coming to 
> mind. (In our use cases all resources needed in the workspace come from 
> *checkout* steps against a source repo and some custom scripting to grab 
> binary artifacts from Artifactory.)
>
> On Wednesday, May 18, 2016 at 12:53:13 AM UTC-7, Jonathan Hodgson wrote:
>>
>> 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 got the same error as above.
>>
>> On Wednesday, May 18, 2016 at 2:21:11 AM UTC+1, Jonathan Hodgson wrote:
>>>
>>> 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 received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4f609c86-a341-4e34-a4e3-cb53fac617fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to