-
Notifications
You must be signed in to change notification settings - Fork 268
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
Exporting new SVN_REVISION_HIGHEST for projects with multiple svn modules #105
Conversation
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
@@ -677,6 +677,7 @@ public void buildEnvVars(AbstractBuild<?, ?> build, Map<String, String> env) { | |||
try { | |||
Map<String,Long> revisions = parseSvnRevisionFile(build); | |||
Set<String> knownURLs = revisions.keySet(); | |||
Long revHighest = new Long(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use long
instead of Long
The improvement looks to be reasonable for me |
@caspercba Hello. Could you provide an use case? When you have configured several modules (repos) you can get |
@caspercba Are you still interested in this PR? |
@recena Yes we can get the svn revision for each one, but we also have to loop through those and find the highest. Looping through svn variables with unknown length its not ideal. So it would be great if jenkins could provide the highest value in one variable. |
@caspercba I believe that this functionality is not responsibility of this plugin. if you agree, I'll close this PR. ok? |
Duplicate of #72? |
@recena Please close it. We have no need for this (anymore), and it doesnt seem to be very popular. |
Objective: Be able to know whats the highest svn revision among all the svn modules contained in the project. The var name is SVN_REVISION_HIGHEST
Motivation: We need to name the final release files using the svn revision. The problem arises when the build was triggered by a change in one of the libraries. We had to find a way to list all the svn revisions for our project and choose the highest one.
Cons: If a project is located in different svn repositories, then there's no point in comparing their revisions. This wouldn't be an issue but the SVN_REVISION_HIGHEST wouldn't be used.