Modify an existing RTC Build Result in Jenkins
Rafael Rezende (43●18●23)
| asked Oct 07 '14, 1:32 p.m.
edited Oct 08 '14, 5:00 a.m. by Ralph Schoon (63.4k●3●36●46)
I'm implementing a prototype of a Delivery Pipeline using RTC and Jenkins with the following flow:
Then, the last stage fails because of the following: I assume it happens because the same Team Concert plugin that generated the RTCBuildResultUUID (build triggered by Jenkins) reports the result back to RTC and completes it automatically. Therefore, the last stage isn't able to modify it anymore.BUILD FAILED C:\Jenkins\pipeline\build_5\publisher_2014-10-07_17-14-07:4: com.ibm.team.build.common.TeamBuildStateException: Unable to "start" build activity with label "Publishing" because the build with ID "_8Aa-sU4zEeSmjKA9BakEKQ", build definition ID "Pipeline BD", label "#5" is in the "COMPLETED" state. So, is there any workaround to modify the Build Result or, at least, keep it open when the 1st stage finishes until the last stage completes it by itself? |
Accepted answer
There is a 1 to 1 mapping between a Jenkins build and an RTC Build result. It looks based on the article that you are setting up several builds which are triggered after the first build completes. When the first build completes the RTC Build result associated with it will be marked as completed (the plugin will do it if the build is initiated within Jenkins, RTC's integration will do it if the build was initiated within RTC). If a triggered build then tries to create an activity on the RTC build result, it will fail because the RTC build result is already completed.
As Ralph says some things can be done after the build is completed, but creating an activity is not one of them (its like trying to say the build is starting this work, when its already finished so how can it start something). Unfortunately I have no ideas on how to keep the result open. Only thing I can think of is to create and manage the lifecycle of a build result in your jobs. Rafael Rezende selected this answer as the correct answer
Comments
Rafael Rezende
commented Oct 15 '14, 9:43 a.m.
Hi Heather,
Rafael Rezende
commented Oct 30 '14, 9:49 a.m.
As said, the Team Concert plugin completes the build on its own.
|
One other answer
Ralph Schoon (63.4k●3●36●46)
| answered Oct 08 '14, 5:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Oct 08 '14, 6:00 a.m.
Rafael,
I am not sure what goes wrong and I have no setup to even begin probing. However I did publish to completed builds and worked with them. See https://jazz.net/library/article/807 . So in general it is possible to do something with the builds after they are completed. You can also still link work items for example. I am wondering if the fact that the build is marked as completed in RTC before the Jenkins steps are performed is really caused by a problem with the setup. I think Jenkins is really leading the build and should actually close it, not the JBE. |
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.