-
New Feature
-
Resolution: Unresolved
-
Major
-
None
Sometimes it is desirable for a Pipeline script to save and retrieve some state (data) which is persisted across builds.
Possibly could be supported using a plugin which defined a Map-valued global variable made accessible to every Pipeline script which would serialize any values you set to it to a per-job location. (Could even have a variable which held per-master state, though you then need to be careful about access control policies.)
As a workaround, for non-sandboxed jobs, you could use java.io.File calls to read/write a file on the Jenkins master. For example
File f = new File(currentBuild.rawBuild.parent.rootDir, 'my-state')
- is blocking
-
JENKINS-27127 wait/notify steps
- Open
- links to