Created a simple pipeline job, as follows;

       

      node {
      readFile myFile
      }

       

      where myFile is 'File location' , and received the following error;

      java.nio.file.NoSuchFileException: ...

      If i look in the workspace of the job, the file which was selected as a parameter hasn't bee uploaded into the workspace, this is the bug.

       
       

          [JENKINS-47333] file parameter not working in pipeline job

          yacoub hossain created issue -

          Have same problem. Please fix it.

          Alexey Grebenshchikov added a comment - Have same problem. Please fix it.

          Such a shame it isn't working, would be quiet a neat thing to be able to use

          yacoub hossain added a comment - Such a shame it isn't working, would be quiet a neat thing to be able to use

          I have the same problem. In my pipeline I have the following code (slightly modified):

          file (                
            name: "dirinworkspace/file.txt",                                                  
            description: 'A file that should be uploaded'        
          )

          I expect the file to be in workspace/dirinworkspace/file.txt, but it's not there. This problem is at least present in Jenkins 2.113.

          Michiel Westerink added a comment - I have the same problem. In my pipeline I have the following code (slightly modified): file (                   name: "dirinworkspace/file.txt",                                                     description: 'A file that should be uploaded'         ) I expect the file to be in workspace/dirinworkspace/file.txt, but it's not there. This problem is at least present in Jenkins 2.113.

          Hi.

          Any update about this bug? 

          Thanks.

          Nahshon Tsameret added a comment - Hi. Any update about this bug?  Thanks.
          Nahshon Tsameret made changes -
          Comment [ Any update? ]

          Ben Herfurth added a comment -

          This bug is known for a long time ... when will it be fixed?

          Ben Herfurth added a comment - This bug is known for a long time ... when will it be fixed?

          Alisdair Robertson added a comment - Related:  https://issues.jenkins-ci.org/browse/JENKINS-27413
          Paolo Lambojon made changes -
          Rank New: Ranked higher

          Issue still persists today.

          Paolo Lambojon added a comment - Issue still persists today.

            huybrechts huybrechts
            hossaiy yacoub hossain
            Votes:
            20 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:
              Resolved: