It almost feels like this should be pretty basic functionality, but thus far in my searches : no luck.
Looking to just get the Git commit counter. I know I can use "git rev-list HEAD --count" from within the workspace, but for various reason I'm using groovy and need to set it as a parameter during build execution (using ParametersAction). Because of this, using system groovy, so running on master ... which means need to connect to slave ... so after massaging, came up with: def git_count_cmd = "def proc = 'git rev-list HEAD --count'.execute(null, new File('${build.getProject().workspace.toString()}')); proc.waitFor(); println proc.text" def git_counter = RemotingDiagnostics.executeGroovy(git_count_cmd, build. workspace.channel).trim() But that just seems like a lot of work to get a Git commit counter ... did I over-complexify? Is there a simpler method? Thanks. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/498d48c0-9819-4d2e-8d3e-7c3faed1725e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.