Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
add an svninfo step that can provide infos for a wc path #176
I implemented an "svninfo" step that provides information like the current revision for a working copy path. If you want to, you can include it in the official release.
Background: We're currently porting our builds to pipeline and miss the SVN_REVISION environment variable. As a workaround, we first tried to shell out and use a native svn to get the info. That works, but the dependency on a native svn (possibly different from the one Jenkins uses) is a potential maintenance problem. I looked some time for another solution but then went ahead implementing it.
I added some more of the provided infos to the returned map. I selected ones I thought could be interesting, but the selection is nevertheless rather arbitrary. It should be easy to extend.
Updating the dependencies does not seem to be that straightforward, at least some tests fail now (ExtensionListListener cannot be found and the test setup does not work anymore). Perhaps I'll have some time to look at it in more depth in the next days.
Solving JENKINS-26100 would definitely be nice. I used the current solution mainly because it seemed easier to me. Also having an svninfo step is more powerful than just returning the revision, so I think they don't exclude each other.