It's all about the answers!

Ask a question

Error publishing artifact with Ant Task: Build Result already set as "COMPLETED"


Rafael Rezende (431823) | asked Jul 29 '14, 1:55 p.m.
edited Jul 29 '14, 1:58 p.m.
Following the procedure described in this link to implement a post-build delivery using RTC + Jenkins, I have experienced the following error when trying to publish a subsequent artifact using Ant Task:
C:\jenkins\jobs\hello-world-rar6si\workspace\publisher_2014-07-29_19-21-57:4: com.ibm.team.build.common.TeamBuildStateException: Unable to "start" build activity with label "Publishing" because the build with ID "_0YrYgxdEEeSjMMspDOFdag", build definition ID "hello-world-bd-rar6si", label "hello-world-rar6si #50" is in the "COMPLETED" state.
I'm using Jenkins with Team Concert plugin v1.1.8. The job is loading the source from RTC SCM, performing a custom build, then the post-build deliver as described in the link above, then a post-build step where the Ant publishing task is executed.
For the example above, the following command-line of the post-build deliver was printed to the console output:
C:\jenkins\jobs\hello-world-rar6si\workspace>C:\rtc\build\buildsystem\buildengine\eclipse\jbe -repository https://rep.server.com/ccm/ -userId rar6si -passwordFile C:\rtc\build\buildsystem\buildengine\eclipse\pass.txt -engineId hello-world-jbe -buildResultUUID _0YrYgxdEEeSjMMspDOFdag -participants com.ibm.team.build.autoDeliver –noComplete
For information, the post-build delivery was performed successfully, as it is when no post-build publishing is used.
If I don't use the post-build deliver, the post-build publishing successfully publishes the artifact and completes the Build Result with no problems.

As mentioned in the thread of the above link, the -noComplete flag should keep the Build Result open for whatever happens after. But it seems not to be working in my case, unless I specified something wrong...
Am I missing anything? Is the any order for the flags?

Comments
Heather Fraser-Dube commented Jul 29 '14, 5:05 p.m.
JAZZ DEVELOPER

I gave this a try and found that the build is not completed after the post build deliver step and I was able to have a subsequent ant task attach a file to the build result. The ant task was a build step after the post deliver step. If I look in my console log I see indication it is running with noComplete:

C:\JenkinsPluginDev\com.ibm.team.build.hjplugin\work\workspace\BuildWithJBESteps>C:/BuildToolkits/RTC-BuildSystem-Toolkit-Win_4.0.6.0-ga/jazz/buildsystem/buildengine/eclipse/jbe -vm C:/Java/ibm-java-sdk-70-win-x86_64/sdk/jre/bin/java -repository https://localhost:9443/jazz/ -userId ADMIN -pass ADMIN -engineId JenkinsPostDeliver -buildResultUUID _YnpwcRdjEeSf2OZ6bTqDmg -participants com.ibm.team.build.autoDeliver -noComplete 
2014-07-29 17:00:57 [Jazz build engine] Searching for buildResultUUID=_YnpwcRdjEeSf2OZ6bTqDmg
2014-07-29 17:00:57 [Jazz build engine] The -noComplete argument was specified. The build result will not be completed by JBE.


Rafael Rezende commented Jul 30 '14, 2:31 a.m. | edited Jul 30 '14, 2:32 a.m.

Thanks for your response, Heather.
This is what I have in my Console (I cannot paste the output in a single comment. # of characters exceeded.):

C:\jenkins\jobs\hello-world-rar6si\workspace>C:\rtc\build\buildsystem\buildengine\eclipse\jbe -repository https://rep.server.com/ccm/ -userId rar6si -passwordFile C:\rtc\build\buildsystem\buildengine\eclipse\pass.txt -engineId hello-world-jbe -buildResultUUID _0YrYgxdEEeSjMMspDOFdag -participants com.ibm.team.build.autoDeliver –noComplete 
2014-07-29 19:22:23 [Jazz build engine] Searching for buildResultUUID=_0YrYgxdEEeSjMMspDOFdag
2014-07-29 19:22:23 [Jazz build engine] Building only the specified participants: "[com.ibm.team.build.autoDeliver]"
2014-07-29 19:22:29 [Jazz build engine] Found a user request for build definition "hello-world-bd-rar6si".
2014-07-29 19:22:29 [Jazz build engine] CRRTC3507W: Warning: An engine participant was not found for the pre_build configuration element "Jazz Source Control".


Rafael Rezende commented Jul 30 '14, 2:31 a.m.
2014-07-29 19:22:29 [Jazz build engine] CRRTC3507W: Warning: An engine participant was not found for the build configuration element "Hudson/Jenkins Build".
2014-07-29 19:22:31 [Jazz build engine] Completed building buildResultUUID=_0YrYgxdEEeSjMMspDOFdag
2014-07-29 19:22:31 [Jazz build engine] Exiting JBE after completing single build request, RC=0.

I'll investigate that and come back with some explanation.
Thanks.

Accepted answer


permanent link
Rafael Rezende (431823) | answered Jul 30 '14, 4:17 a.m.
Solved...
The issue is that the command came from a wiki, e-mail or word document in which the original "-" signal was automatically replaced by "–", not recognizable as parameter in the console.
In courier font it isn't possible to notice, neither it is in the console output. But the difference became clear in the question itself.
Silly mistake...
Ralph Schoon selected this answer as the correct answer

Your answer


Register or to post 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.