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

[JENKINS-14155] Make it possible to automatically select/build the latest svn tag #40

Closed
wants to merge 2 commits into from

Conversation

pmoranga
Copy link

With this change we are able to build the last tag matching the filters set. For that you need to:

  • Set defaultTagParameter to match the desired tag.
  • and maxTags is 1.

@buildhive
Copy link

Jenkins » subversion-plugin #124 SUCCESS
This pull request looks good
(what's this?)

@jenkinsadmin
Copy link
Member

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

@@ -138,6 +138,9 @@ public ParameterValue createValue(StaplerRequest req, JSONObject formData) {
@Override
public ParameterValue getDefaultParameterValue() {
if (StringUtils.isEmpty(this.defaultValue)) {
if ( isInt(this.maxTags) && Integer.parseInt(this.maxTags) == 1 ){
return new ListSubversionTagsParameterValue(getName(), getTagsDir(), this.getTags().get(0));
Copy link
Member

Choose a reason for hiding this comment

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

What if getTags() returns an empty list here (IndexOutOfBoundException)? Can that happen?

@jglick
Copy link
Member

jglick commented Jun 16, 2017

Merge conflicts. Anyway this plugin needs a lot of cleanup before new features will be considered, unless they are clearly self-contained.

@kuisathaverat
Copy link
Contributor

Is #157 the same use case?

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

Successfully merging this pull request may close these issues.

7 participants