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 support of ChoiceParameterDefinition #3

Merged
merged 1 commit into from Feb 3, 2015

Conversation

Projects
None yet
3 participants
@jhaeyaert
Copy link

jhaeyaert commented Jan 26, 2015

This pull request allow to add support of ChoiceParameterDefinition in addition of StringParameterDefinition.

@jenkinsadmin

This comment has been minimized.

Copy link
Member

jenkinsadmin commented Jan 26, 2015

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

@elvanja

This comment has been minimized.

Copy link

elvanja commented Jan 28, 2015

Hi, so basically this is just an addition that makes hook accept ChoiceParameterDefinition parameters as well. But, where is the code that sets the value of such parameter? Did you test this on a live instance?

@jhaeyaert

This comment has been minimized.

Copy link
Author

jhaeyaert commented Jan 29, 2015

Hi,

Yes I tested it on a live instance and it works well. Basically, I have a Jenkins job that takes a choice parameter named BRANCH. I can manually launch the job selecting the branch that I want to build or I can just let the GitLab hook provide the ${BRANCH} parameter and launch the job for me when I push my code on the repository.

I also tested it with the FULL_BRANCH_REFERENCE parameter name and it works too. I haven't tested it with other parameters but I suppose It works the same.

So I suppose there is nothing else to do ?

Thanks

@elvanja

This comment has been minimized.

Copy link

elvanja commented Jan 29, 2015

How does it behave if the choice is not found in available options?
E.g. you added "master" and "develop" but "featureX" is filled from Gitlab payload?

@jhaeyaert

This comment has been minimized.

Copy link
Author

jhaeyaert commented Jan 29, 2015

It's not a problem cause Jenkins allows to specify a value even if it is not part of the list.
I've tested this case (create a new branch and push it) and Jenkins is able to build the branch even if I haven't added the branch into the list.

elvanja added a commit that referenced this pull request Feb 3, 2015

Merge pull request #3 from jhaeyaert/feature/ChoiceParameterDefinition
Added support of ChoiceParameterDefinition

@elvanja elvanja merged commit 7623152 into jenkinsci:master Feb 3, 2015

@elvanja

This comment has been minimized.

Copy link

elvanja commented Feb 3, 2015

I've merged it and fixed failing test (also altered the code a bit). You can find this in latest release v1.2.1. If you're in a hurry, you can download manually from http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/ruby-plugins/gitlab-hook/1.2.1

@jhaeyaert jhaeyaert deleted the jhaeyaert:feature/ChoiceParameterDefinition branch Feb 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.