Created
August 13, 2013 14:00
-
-
Save ysb33r/6221409 to your computer and use it in GitHub Desktop.
Obtaining the SVN Tracking Plugin information from within a Jenkins Build Flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assumuing that the build flow tracks another job's SVN revision | |
// Get the SVN URLs and revisions | |
def svn=build.getAction(hudson.scm.RevisionParameterAction.class) | |
svn.revisions.each { | |
println it.SVNURL | |
println it.revision | |
} | |
// Get the Build number of the job being tracked | |
def trackedJob=build.getAction(hudson.plugins.trackingsvn.TrackingSVNAction.class) | |
println trackedJob.trackedBuildNumber |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment