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

Can't read file with Groovy API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Critical Critical
    • pipeline
    • None
    • OSX 10.11.6

      I have a file in my workspace that was generated by a Maven plugin. When I try to read it with

      new File(filename).text

      a FileNotFoundException was thrown although the file exists. The pipeline doesn't run in a sandbox and there's no method to approve at the In-process Script Approval view.

      But I'm able to read that file using the pipeline's readFile method.

      I tried both a relative as well as an absolute path to the file.

      Is there anything I'm missing or is this a bug?

            Unassigned Unassigned
            maxzilla Max Wahler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: