RTC 4.0.1 integration with Jenkins - how can I check to see if any changesets were accepted into the workspace?
I am running an RTC -> Jenkins build every 15 minues and would like to be able to determin on the Jenkins side after the JBE steps completes whether any changesets were accepted into the workspace. Is there a property I can examine to determine if any changesets were accepted? If so I can check that property and if no changesets were accepted I can exit the Jenkins build script wthout executing any of the acutal code build steps.
I am using a modified version of the buildOnHudsonJenkinsAdvanced script. |
Accepted answer
You mean other than the return code of 2 from JBE? Anything else would have to be regexed with scm status or something along those lines where it would be able to detect incoming changesets.
~Spencer Donald Poulin selected this answer as the correct answer
Comments The RC=2 in the JBE output only occurs for scheduled builds, when there are no changes accepted and hence nothing to build. If the build is being scheduled from Jenkins, then this won't apply.
JBE's SCM participant does set a "team.scm.changesAccepted" property, but this doesn't appear in the JBE output. You could get it by configuring the build definition to output a properties file, then parsing that, but that's admittedly tedious.
Donald Poulin
commented Mar 20 '13, 5:53 a.m.
So within the "buildOnHudsonJenkinsAdvanced script" how would I check for an RC=2 and then exit the script?
Donald Poulin
commented Mar 20 '13, 7:21 a.m.
Cancel that last question - I found the section "loadworkspace" where the return code(s) are evaluated. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.