Using a Group or Role to Variable to customize a build script

5 views
Skip to first unread message

Don Meuth

unread,
Jan 12, 2015, 2:46:48 PM1/12/15
to jenkins...@googlegroups.com
I am new to Jenkins, and we are migrating multiple scripts to Jenkins from other environments. 

We basically have 2 Roles with more to come  Developers and Administrators 

We would like to be able to write a build script once and tailor the input fields based upon the user's defined role. 

Is there a way to get, in a build script the Role or Group that a user belongs to? 

For example we allow our developers to build and deploy to a Project environment, but only Admins can deploy to QA and Production.  if we can limit the choices (via a script) for developers to only show the Project environment for input, we can now write a script once and use it for many different environments. 

I have set up Groovy scripts to pull the information from files, and if I can supply the group or role information the script can pull based upon that information.

This message and any files transmitted with it are the property of Sigma-Aldrich Corporation, are confidential, and are intended solely for the use of the person or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please contact the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited.
Reply all
Reply to author
Forward
0 new messages