Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added functionality to store all multi-level multi selected values #10

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

lkisac
Copy link

@lkisac lkisac commented Jan 22, 2015

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@lkisac
Copy link
Author

lkisac commented Jan 22, 2015

Example:

extendedchoiceexample1
extendedchoiceexample1-consoleoutput

import hudson.model.StringParameterValue;

public class ExtendedChoiceParameterValue extends StringParameterValue{
private static final long serialVersionUID = 7993744779892775177L;
private Map<Integer, String> allCols;
private Map<Integer, List<String>> allColsList;
private int multiLevelColumns;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such implementation won't work with Rebuild Plugin. I recommend to integrate an RebuildParameterProvider extension into the plugin.

@lkisac lkisac force-pushed the len-storeMultipleValues1 branch 3 times, most recently from 152e781 to 5e17cfa Compare February 25, 2015 14:48
…atibility

1. added rebuild dependency to pom
2. created ExtendedChoiceRebuildParameterProvider class (extends RebuildParameterProvider)
3. ExtendedChoiceParameterValue - get/set methods
@lkisac lkisac force-pushed the len-storeMultipleValues1 branch from 5e17cfa to 899c477 Compare February 25, 2015 15:18
@lkisac
Copy link
Author

lkisac commented Mar 4, 2015

I've added Selenium/TestNG Unit Tests in a new branch.

It configures a job, runs the build and verifies the output from the Extended Choice Multi-Level Parameter (similar to examples above).

You just need to change String jenkinsUrl (to your Jenkins instance), String chromeDriverExe (path to chromeDriver.exe), and String user[] (to your username & password) in ExtendedChoiceParameterSeleniumTestNG.java

@lkisac
Copy link
Author

lkisac commented Mar 9, 2015

Added JUnit tests for createValue(StaplerRequest, JSONObject) method from ExtendedChoiceParameterDefinition class in len-UnitTests branch.

@brandonroeder
Copy link

Any update on this?

@oleg-nenashev
Copy link
Member

Ping @vimil

@gutschet
Copy link

I would really love this feature, because the workaround ist to make one parameter for every level but then you do not have validation that the selections fit together. I would like to use it in a CI job, I have a properties file like this:

customer	stage	version
c1		dev	1.0
c1		dev	2.0
c1		dev	3.0
c1		test	1.0
c1		test	2.0
c1		prod	1.0

but only version variable gets populated. Maybe anyone wants to finish this feature!? Or is there an alternative?

Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants