Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47333

file parameter not working in pipeline job

    Details

    • Similar Issues:

      Description

      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.

       
       

        Attachments

          Activity

          hossaiy yacoub hossain created issue -
          Hide
          aleksio Alexey Grebenshchikov added a comment -

          Have same problem. Please fix it.

          Show
          aleksio Alexey Grebenshchikov added a comment - Have same problem. Please fix it.
          Hide
          hossaiy yacoub hossain added a comment -

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

          Show
          hossaiy yacoub hossain added a comment - Such a shame it isn't working, would be quiet a neat thing to be able to use
          Hide
          mwesterink 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.

          Show
          mwesterink 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.
          Hide
          nahsh Nahshon Tsameret added a comment -

          Hi.

          Any update about this bug? 

          Thanks.

          Show
          nahsh Nahshon Tsameret added a comment - Hi. Any update about this bug?  Thanks.
          nahsh Nahshon Tsameret made changes -
          Field Original Value New Value
          Comment [ Any update? ]
          Hide
          bherfurth Ben Herfurth added a comment -

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

          Show
          bherfurth Ben Herfurth added a comment - This bug is known for a long time ... when will it be fixed?
          Show
          alisdair_robertson Alisdair Robertson added a comment - Related:  https://issues.jenkins-ci.org/browse/JENKINS-27413
          paoloxide Paolo Lambojon made changes -
          Rank Ranked higher
          Hide
          paoloxide Paolo Lambojon added a comment -

          Issue still persists today.

          Show
          paoloxide Paolo Lambojon added a comment - Issue still persists today.
          Hide
          markewaite Mark Waite added a comment - - edited

          JENKINS-27413 comments describe why it does not work today and give a strong indication that it won't work in the future.

          I created a small test case that I used to interactively verify the issue exists. The file parameter is accepted as part of the Declarative Pipeline job definition and the job accepts the uploaded file, but the file does not seem to be placed anywhere that I could detect. It was not placed in the workspace of the agent running the job, nor was it placed on the master file system. I believe that the comments from Jesse Glick in JENKINS-27413 explain why the file is not stored anywhere.

          Removed from documentation on jenkins.io July 25, 2019 by PR-2388

          Show
          markewaite Mark Waite added a comment - - edited JENKINS-27413 comments describe why it does not work today and give a strong indication that it won't work in the future. I created a small test case that I used to interactively verify the issue exists. The file parameter is accepted as part of the Declarative Pipeline job definition and the job accepts the uploaded file, but the file does not seem to be placed anywhere that I could detect. It was not placed in the workspace of the agent running the job, nor was it placed on the master file system. I believe that the comments from Jesse Glick in JENKINS-27413 explain why the file is not stored anywhere. Removed from documentation on jenkins.io July 25, 2019 by PR-2388

            People

            • Assignee:
              huybrechts huybrechts
              Reporter:
              hossaiy yacoub hossain
            • Votes:
              17 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

              • Created:
                Updated: