Jenkins Dynamic Parameter Plug-in

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID dynamicparameter Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
0.2.0
Oct 01, 2012
1.447
scriptler (version:2.2)
token-macro (version:1.5.1)
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Dimitar Popov (id: dimitarp)
Christian Baranowski (id: baranowski)
Usage Installations 2013-Apr 981
2013-May 1102
2013-Jun 1156
2013-Jul 1295
2013-Aug 1275
2013-Sep 1340
2013-Oct 1491
2013-Nov 1551
2013-Dec 1596
2014-Jan 1724
2014-Feb 1886
2014-Mar 1986

This plugin allows dynamic generation of default build parameter values.

Not hosted here!
This plugin is hosted at GitHub: https://github.com/Seitenbau/sb-jenkins-dynamicparameter

Description

What Does the Plugin Do?

The plugin allows creating a build parameters, which default value(s) are generated by a Groovy script. The Groovy script is executed each time the build is triggered and allows generating default value(s) according to the current build context (e.g. current user-name, current date/time, etc. or more complex Groovy scripts). The Groovy script can be executed either on the master or on the slave where the build is executed. This can be configured from the build configuration page.

The plugin provides two types of parameters: simple text-field parameter and a choice (drop-down) parameter. If the parameter is a text-field, the corresponding Groovy script must return a single string value. If the parameter is a choice parameter, then the script must return a list of string values.

Examples
Current Date and Time

This is a simple example shows how to create a build parameter which has the current date and time. Create a new build job and choose "This build is parameterized". From the "Add Parameter" drop-down menu, choose "Dynamic Parameter".

Fill in the parameter "Name" and optional "Description". In the field "Default Value Script" write the Groovy script which returns the current date:

Note: if the "Remote Script" check-box is checked, then the script will be executed on the slave where the build is started.

Save the current job and click "Build Now". The build configuration page with the current date and time should show up:

Simple Choice List

This is a simple example which shows how to create a choice parameter. Similar to the previous example, create a new build job and choose "This build is parameterized". From the "Add Parameter" drop-down menu, choose "Dynamic Choice Parameter". Fill in the parameter "Name" and optional "Description". In the field "Choices Script" write the Groovy script which returns a list with some values:

Save the current job and click "Build Now". The build configuration page with a drop-down to choose from one of the generated values should show up:

Version History

0.1.1 (Apr 03, 2012)
  • Safe use of anonymous classes
  • Fixes in POM to allow release with maven release plugin
0.1.0 (Mar 20, 2012)
  • Initial release

Labels

Edit
plugin-parameter plugin-parameter Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment