pipeline - build job with FileParameterValue

618 views
Skip to first unread message

José Coelho

unread,
Nov 28, 2016, 6:53:52 AM11/28/16
to Jenkins Users
I am trying to invoke a job that accepts a file:

    build job: 'UploadPackage', parameters: [
        string(name: 'ARCH',    value: 'x86_64'),
        [$class: 'FileParameterValue', file: new File('myfile'), originalFileName: "package.rpm"]


However, I got:

java.lang.ClassCastException: hudson.model.FileParameterValue.file expects interface org.apache.commons.fileupload.FileItem but received class java.io.File


What am I doing wrong?

Jonathan Hodgson

unread,
Nov 28, 2016, 7:43:45 AM11/28/16
to Jenkins Users
That was pretty much the first problem I ran into!

File Parameters don't currently work with pipelines

Reply all
Reply to author
Forward
0 new messages