jenkinsci/job-dsl-plugin — pull request #263 by daspilker (2014-08-14 07:10:59+00:00)
Title: Added a method to read a file from any workspace

Added a new variant of `readFileFromWorkspace` to read a file from the workspace of any job. This can be used to set the description of a job from a file in the job's workspace. The method will return `null` when the job or the file does not exist or the job has no workspace, e.g. when it has not been built yet. This works well with the [Project Description Setter Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Project+Description+Setter+Plugin), because otherwise the description set by that plugin will be lost after each run of the seed job.

```groovy
job {
name('acme-tests')
description(readFileFromWorkspace('acme-tests', 'README.txt'))
}
```