Extended Choice Parameter plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID extended-choice-parameter Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
0.48 (archives)
Jun 17, 2015
1.466
Source Code
Issue Tracking
Pull Requests
Maintainer(s)
GitHub
Open Issues
Pull Requests
Vimil Saju (id: vimil)
Usage Installations 2014-Jun 3690
2014-Jul 4039
2014-Aug 4143
2014-Sep 4417
2014-Oct 4587
2014-Nov 4737
2014-Dec 4803
2015-Jan 5176
2015-Feb 5388
2015-Mar 5849
2015-Apr 6034
2015-May 6191

Adds extended functionality to Choice parameter.

Change Log

Version 0.44 (Jun 02, 2015)

Added JSON Parameter feature based on json html editor by Jeremy Dorn
The groovy script should return a JSON object that corresponds to the "options"  object referred to in  json-editor

Ex:

import net.sf.json.JSONObject;

def jsonEditorOptions = JSONObject.fromObject(/{
        disable_edit_json: true,
        disable_properties: true,
        no_additional_properties: true,
        disable_collapse: true,
        disable_array_add: true,
        disable_array_delete: true,
        disable_array_reorder: true,
        theme: "bootstrap2",
        iconlib:"fontawesome4",
       "schema":{
  "title": "Applications",
  "type": "array",
  "format":"tabs",
  "items": {
	 "title": "Application",
	 "headerTemplate": "{{self.name}}",
	 "type": "object",
	 "properties": {
		"name" : {
			 "title": "application",
			 "type": "string",
			 "readOnly": "true"

		 },
		 "environments": {
			 "title": "Environments",
			 "type": "array",
			 "format":"tabs",
			 "items": {
				 "title": "Environment",
				 "headerTemplate": "{{self.name}}",
				 "type": "object",
				 "properties": {
					"name" : {
						 "title": "environment",
						 "type": "string",
						 "readOnly": "true"

					 },
					 "properties": {
						 "type": "array",
						 "format": "table",
						 "items": {
							 "type": "object",
							  "properties": {
								  "name" : {
									  "type": "string",
									  "readOnly": "true"
								  },
								  "value" : {
									  "type": "string"
								  }
							  }
						 }
					 },
					 "servers": {
						 "title": "Servers",
						 "type": "array",
						 "format":"tabs",
						 "items": {
							 "title": "Server",
							 "headerTemplate": "{{self.name}}",
							 "type": "object",

							 "properties": {
								"name" : {
									 "title": "server",
									 "type": "string",
									 "readOnly": "true"

								 },
								 "properties": {
									 "type": "array",
									 "format": "table",
									 "items": {
										 "type": "object",
										  "properties": {
											  "name" : {
												  "type": "string",
												  "readOnly": "true"
											  },
											  "value" : {
												  "type": "string"
											  },
											  "override": {
												"type": "boolean"
											  }
										  }
									 }
								 }
							 }
						 }
					 }
				 }
			 }
		 }
	 }
  }
},
       startval: [
  {
    "name": "agent",
    "environments": [
      {
        "name": "dev1",
		"properties": [
		  {
			"name": "database_url",
			"value": "dev1_url"
		  },
		  {
			"name": "database_password",
			"value": "dev1_password"
		  }
		],
        "servers": [
			{
				"name": "agt11",
				"properties": [
				  {
					"name": "database_url",
					"value": "agt11_url",
					"override": "true"
				  },
				  {
					"name": "database_password",
					"value": "agt11_password",
					"override": "true"
				  }
				]
			},
			{
				"name": "agt12",
				"properties": [
				  {
					"name": "database_url",
					"value": "agt12_url",
					"override": "true"
				  },
				  {
					"name": "database_password",
					"value": "agt12_password",
					"override": "true"
				  }
				]
			}
		]
      },
	  {
        "name": "devprod",
		"properties": [
		  {
			"name": "database_url",
			"value": "devprod_url"
		  },
		  {
			"name": "database_password",
			"value": "devprod_password"
		  }
		],
        "servers": [
			{
				"name": "agt11",
				"properties": [
				  {
					"name": "database_url",
					"value": "agt11_prod_url",
					"override": "true"
				  },
				  {
					"name": "database_password",
					"value": "agt11_prod_password",
					"override": "true"
				  }
				]
			},
			{
				"name": "agt12",
				"properties": [
				  {
					"name": "database_url",
					"value": "agt12_prod_url",
					"override": "true"
				  },
				  {
					"name": "database_password",
					"value": "agt12_prod_password",
					"override": "true"
				  }
				]
			}
		]
      }
    ]
  },
  {
    "name": "consumer",
    "environments": [
      {
        "name": "dev1",
		"properties": [
		  {
			"name": "database_url",
			"value": "dev1_url"
		  },
		  {
			"name": "database_password",
			"value": "dev1_password"
		  }
		],
        "servers": [
			{
				"name": "app11",
				"properties": [
				  {
					"name": "database_url",
					"value": "app11_url",
					"override": "true"
				  },
				  {
					"name": "database_password",
					"value": "app11_password",
					"override": "true"
				  }
				]
			},
			{
				"name": "app12",
				"properties": [
				  {
					"name": "database_url",
					"value": "app12_url",
					"override": "true"
				  },
				  {
					"name": "database_password",
					"value": "app12_password",
					"override": "true"
				  }
				]
			}
		]
      },
	  {
        "name": "devprod",
		"properties": [
		  {
			"name": "database_url",
			"value": "devprod_url"
		  },
		  {
			"name": "database_password",
			"value": "devprod_password"
		  }
		],
        "servers": [
			{
				"name": "app11",
				"properties": [
				  {
					"name": "database_url",
					"value": "agt11_prod_url",
					"override": "true"
				  },
				  {
					"name": "database_password",
					"value": "app11_prod_password",
					"override": "true"
				  }
				]
			},
			{
				"name": "agt12",
				"properties": [
				  {
					"name": "database_url",
					"value": "app12_prod_url",
					"override": "true"
				  },
				  {
					"name": "database_password",
					"value": "app12_prod_password",
					"override": "true"
				  }
				]
			}
		]
      }
    ]
  }
]
}

}/);

return jsonEditorOptions;

Version 0.33 (Jun 09, 2014)

Separated out multilevel single select and multilevel multi-select parameters into separate sections. 

Version 0.32 (Jan 07, 2012)

Added ability to use groovy script to fetch options for parameter.

Version 0.20 (Jan 07, 2012)
  • New field to configure number of items visible in selectbox without scrolling
  • New 'checkbox' and 'radio button' parameter types added
  • changed all validation error checks to warnings
  • added ability to specify an url instead of absolute directory path for property files 
  • ability to specify property references for values, for example
    • prop1=a,b,c,d,e
    • prop2=${prop1},f,g,h  --(prop2 will now evaluate to a,b,c,d,e,f,g,h)
Version 0.5 (Jan 10, 2012)
  • Use a dropdown when using single select mode
  • Trim properties
  • When using a properties file, do not load the file content when editing the job
  • Load the 'latest' property at each build
  • Added some validation for properties file names
Version 0.1 (Jul 14, 2010)
  • Initial release

This plugin allows single select and multi select build parameters to be configured.

Here is a screenshot of the configuration page.

The 'value' field is a comma separated list of values for the single select or multi-select box.
This field can be left blank if the comma separated values need to be picked up from a properties file.
In that case the fields 'Property File' and 'Property Key' need to be filled in.

The 'default value' field is used to set the initial selection of the single-select or mult-select box.
in case of the multi-select box default value can be a comma separated string.
This field can be left blank if the default value needs to be picked up from a properties file.
In that case the fields 'Default Property File' and 'Default Property Key' need to be filled in.

Note: Neither "Property File" or "Default Property File" support referencing environment variables in their values. Thus, their values should be absolute paths specified without using environment variables.

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