Using multi-branch pipeline folder properties in a job?

25 views
Skip to first unread message

zil...@gmail.com

unread,
Jul 13, 2021, 9:02:24 AM7/13/21
to Jenkins Users
I hav a Jenkins folder that contains several jobs. Some of the jobs, not all, are multi-branch pipelines. The multi-pipeline jobs' configuration page has a setting for "Folder properties" and I created a simple string key/value pair in there. How can I reference this in my pipeline? I've tried this to no avail.

String someKeyValuePair = "junk"
withFolderProperties {
  someKeyValuePair = env.SOME_KEY_VALUE_PAIR
}
println someKeyValuePair

and it just prints "junk," that is, it never picks up the folder property I set up. Any clues?

Thanks,
Chris
   
Reply all
Reply to author
Forward
0 new messages