How to use Folder plugin to define properties that are visible to jobs inside

17 views
Skip to first unread message

Samith Dassanayake

unread,
May 6, 2015, 2:03:51 PM5/6/15
to jenkin...@googlegroups.com
Hi all,
According to [1] it says it is possible to define properties for a folder that are visible to jobs inside. Assume I want to add a property "testProperty" and I want to access it from the job. How can I achieve that? 


Thanks,
Samith

Jesse Glick

unread,
May 6, 2015, 2:09:53 PM5/6/15
to Jenkins Dev
On Wed, May 6, 2015 at 2:03 PM, Samith Dassanayake <hisa...@gmail.com> wrote:
> According to […] it is possible to define properties for a folder
> that are visible to jobs inside. Assume I want to add a property
> "testProperty" and I want to access it from the job. How can I achieve that?

You would need a dependency on the cloudbees-folder plugin, then
define a FolderProperty class (very similar to JobProperty), and check
for its presence on a Folder which contains a Job (getParent or
transitively).
Reply all
Reply to author
Forward
0 new messages