jenkins pipeline unable to read files
<p>I have a simple Jenkinsfile where I want to load some data from the workspace. I am using the pipeline plugin to leverage the Jenkinsfile inside of the repository. The build is farmed off to a matching Jenkins agent. When I try to use "readFile" I get the following message:</p>

<blockquote>
  <p>java.io.FileNotFoundException: /path/to/jenkins/workspace/XXXXX/project/data.json (No such file or directory)</p>
</blockquote>

<p>I also get the same message when trying to load a Groovy file from the workspace.</p>

<p>My <code>Jenkinsfile</code> looks like:</p>

<pre class="lang-groovy prettyprint-override"><code>node('master') {
    stage "Start"
    echo "Starting"

    stage "Load File"
    def myJson = readFile "data.json"
}
</code></pre>

<p>Any ideas why I can't read these files?</p>

<p>Thanks,
 Tim</p>