"Build only if there are changes accepted" not working with Jenkins plugin
Hi.
In the RTC Build Definition, I select "Build only if there are changes accepted", but it seems to always build. How can I get the build done through Jenkins and the Team Convert Plugin to respect this setting?
I am using:
Jenkins ver. 1.554.3 on Windows,
Team Concert Plugin 1.1.8
Build System Toolkit=4.0.4.0-RTC-I20130803-2156
I allow Build Definition to schedule the build, which is how the build is started. The build definition uses a Build Engine that directs the build to Jenkins. Jenkins uses a slaves to do the build via the Team Concert Plugin.
In the Jenkins console log during the source fetch stage, I see:
RTC : checkout...
RTC : Build initiated by request from RTC
RTC Checkout : Source control setup
RTC Checkout : Accepting changes into workspace "bddpmtestjava_main_bddpmtestjava_bibld" ...
RTC Checkout : Deleting fetch destination "D:\monaco\bddpmtestjava\bddpmtestjava_main\winx64h\src" before fetching ...
RTC Checkout : Fetching files to fetch destination "D:\monaco\bddpmtestjava\bddpmtestjava_main\winx64h\src" ...
RTC Checkout : Fetching Completed
It does not show show that it fetches any changes. I dump the environment in my build, and I see these settings: The first item should likely be true, no?
team_scm_buildOnlyIfChanges=false
team_scm_acceptBeforeFetch=false
Accepted answer
This would have the server look for changes if this flag is set and its a scheduled build prior to sending the build to Jenkins.
The other option is to use Jenkin's scheduling mechanism to start the build. Jenkins supports polling scheduling. Based on the scheduling Jenkins will ask the Team Concert plugin if there are changes and if the answer is yes, it will start the build.
2 other answers
Sam - if the method you suggest were to be done, I think there'd be a Jenkins job created for every build attempt, since the job would have to be running before the job itself determines that there are no sources changes to carry on building with. I guess that would be okay, but I am hoping to only see Jenkins job that actually run after it is determined that there are source changes to build.
Heather - I am able to get my job started conditionally now, depending on whether there are SCM changes. Thanks! I see there is an "Rational Team Concert (RTC) Polling Log" link created - it seems to how the results of only the very last poll, so its hard to see a log of the when all the recent polls were done. Maybe the polling could be enhanced to show the last few polls something or something like that? Perhaps all of today's polls for example, or maybe the last 10 polls, etc.
Also, just to confirm that the correct workspace is being referred to, perhaps the RTC information about what is actually being polled for changes should be included in the log, i.,e,. at least the work space name, perhaps the server url, and possibly the credentials being used, just in case there are problems.
Comments
I see that if a build is attempted after a source change, and the build fails, there is no further attempt to do another build at the next scheduled time, since the source changes have now been accepted into the workspace. Is there a mechanism to keep attempting a build according to the schedule until there is a good build? In our case, we have builds that are typically scheduled only once a day. If a build fails due to an infrastructure issue (network connection, disk space, tools failure), this might typically be fixed within one day, without a corresponding source change, and then the builds do not have to be manually forced - they will attempt a new build according to their schedule, and assuming the next build goes through, then they will do no more build attempts until the next source change.
Comments
sam detweiler
Jul 25 '14, 11:38 a.m.Rick Patterson
JAZZ DEVELOPER Jul 25 '14, 12:12 p.m.sam detweiler
Jul 28 '14, 11:01 a.m.