How to use folder properties?

196 views
Skip to first unread message

ZillaYT

unread,
Nov 26, 2018, 10:12:40 AM11/26/18
to Jenkins Users
I have the folder properties plugin installed, and have defined some folder properties, e.g., key=PROJECT_NAME, value=foo. How do I use this in my jobs that belong in the folder? I tried env.PROJECT_NAME but it doesn't find it. Thanks!

ZillaYT

unread,
Nov 26, 2018, 10:32:10 AM11/26/18
to Jenkins Users
I wanted to clarify that I created a folder, and then jobs inside the folder. I then configured the folder to have properties (e.g., PROJECT_NAME) that I'm trying to use in the jobs inside the folder.

ZillaYT

unread,
Nov 26, 2018, 3:52:41 PM11/26/18
to Jenkins Users
RTFM: https://wiki.jenkins.io/display/JENKINS/Folder+Properties+Plugin

Had to use in my Jenkinsfile
withFolderProperties {
    projectName
= env.PROJECT_NAME
}
Reply all
Reply to author
Forward
0 new messages