"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:
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.
RTC : checkout...
team_scm_buildOnlyIfChanges=false
|
Accepted answer
![]()
There is an enhancement Enhance Hudson/Jenkins server-side integration to cater for SCM Build check
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. Rick Patterson selected this answer as the correct answer
|
Comments
can u post the setting in your build def? mine looks like this
you could also dump the attribute
team.scm.changesAccepted as noted in the text above
Hi.
Yes, those are the settings I have in my RTC build definition that you show above.
Here is part of the env of the job that ran: (I see in my original post I posted 2 variables that were showing false, I managed to not copy the right log. The correct log of these entries is below, showing the settings as true, are the ones I meant to put into this question.)
requestUUID=_xvOtMBQTEeSmR-OeB3B5Jg
scheduledBuild=true
team_scm_buildOnlyIfChanges=true
team_scm_workspaceUUID=_gJhnsMsKEeOw7qhcjnOpwg
team_scm_deleteDestinationBeforeFetch=true
team_scm_createFoldersForComponents=true
team_scm_fetchDestination=src
team_scm_componentLoadRules=component=_KAyLwMsGEeOw7qhcjnOpwg fileitem=_ir4MgMsGEeO_wLgq8Ym4AA
team_scm_acceptBeforeFetch=true
team_scm_snapshotUUID=_zxEpIBQTEeSmR-OeB3B5Jg
team_scm_includeComponents=false
I don't see the team_scm_changesAccepted variable, indicating there were no changes accepted (according to the documentation), but the build still continues on instead of quitting.
sounds like you haven't configured the jenkins build properly..
the RTC plugin provides the environment variable..
| apparently the plugin doesn't export this token (on version 1.1.3)
| so the rest is not possible
and you would have to
change your job step to a conditional job step and check for the presence of the
team_scm_changesAccepted attribute. and only compile if present.
(you will need the jenkins conditional job step plugin)