Best Practice for Resolving User Supplied Build Parameters Used in Plugin Textboxes

13 views
Skip to first unread message

Jimmy Ray

unread,
Mar 24, 2016, 3:39:09 PM3/24/16
to Jenkins Developers
So, I am writing a build step plugin that has several textbox fields for configuration.  I need to let users create entries in these textbox fields that come from build parameters when this plugin is used in a Parameterized Build.  So, I would have jobs configured with ${...} values embedded in the textbox field strings.  What is the best practice for accessing/parsing these build parameters from within the perform() method of my plugin?  For example, I can access the build parameters via the build.getBuildVariableResolver().resolve(...) method.  Is that the best way?  Should I parse the string from between the ${...} braces, or are there helpers or extension points that are already built for this purpose?

-Jimmy
Reply all
Reply to author
Forward
0 new messages