RTC/Jenkins integration - build only if there are source changes
Hello Everyone,
I am trying to use RTC/Jenkins integration in RTC 4.0. Having setup a Jenkins engine, I am setting up a build definition with Jazz Source Control enabled. I have "Build only if changed accepted" checked and scheduled a build to run every 5 minutes. At this time, I would expect the build scheduler to look for changes and submit the build into Jenkins only if necessary. However the build definition triggers builds no matter what.
I have seen the expected behavior in RTC 3.0 with JBE. With Jazz Source Control enabled, you won't even see a build triggered unless there are source changes, avoids unnecessary cycles/build requests at the JBE.
This is a very useful feature, not sure why its dropped in Jenkins integration. Any ideas?
Thanks
Sunil
4 answers
the current rtc/jenkins integration is only at the Job/Build definition level. there is no Source smarts.
so, you either have to manually initiate a job, or the jenkins server has to poll. in either case you may in fact not need to build. for Source code activities, you have a few choices.. use JBE or some ANT tasks to talk to RTC SCM, or the open source RTC jenkins plugin, which altho primitive is easy to use. but it loads the whole workspace every time.
IBM says they are working on some triggering mechanisms, but not in 4.0.2 just released.
so, you either have to manually initiate a job, or the jenkins server has to poll. in either case you may in fact not need to build. for Source code activities, you have a few choices.. use JBE or some ANT tasks to talk to RTC SCM, or the open source RTC jenkins plugin, which altho primitive is easy to use. but it loads the whole workspace every time.
IBM says they are working on some triggering mechanisms, but not in 4.0.2 just released.
Comments
You will still need to call the JBE from the Hudson build to use the Jazz SCM participant. The participant is just a bunch of data that the JBE happens to know how to interpret, however Hudson by itself does not know what to do with it.
There is an indepth article on this on the wiki:
https://jazz.net/wiki/bin/view/Main/JazzScmWithJenkins
~Spencer
Comments
As Sam stated above, the RTC/Jenkins integration that runs server-side doesn't know about SCM. Nor does our scheduler know about SCM (that would be a major design change). You need something in the Jenkins build to run the SCM phase, either via a Jenkins plugin or using a script calling out to our Ant tasks and/or JBE. The latter was the approach recommended in the above-mentioned wiki page.
Now that the new Jenkins plugin has been released, we recommend using that instead. If you configure the scheduling on the Jenkins side, continuous builds should be handled as you expect: it polls the server for changes, and only runs the build if changes are found.
and the referenced tutorial wiki page and video.
Comments
HI Sunil,
In Addition to Spencer\Nick's answers, Please find the blog for same requirements and let us know does it helps.
Regards,
Arun.
In Addition to Spencer\Nick's answers, Please find the blog for same requirements and let us know does it helps.
Scheduled Jenkin Build Should run only if there are "changes accepted "
https://www.ibm.com/developerworks/community/blogs/nfrsblog/entry/scheduled_jenkin_build_should_run_only_if_there_are_changes_accepted?lang=enRegards,
Arun.
Comments
Bernie Bonn
Aug 18 '15, 5:37 p.m.