Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Problems with startBuildActivity when calling Ant externally

I have a build script implemented in Ruby running under the Jazz Build Engine that adds progress monitoring to a build result by calling Ant tasks via an external Java process.

E.g. in my Ruby script I call Ant like so:

`#{JAVA} -cp #{SOURCE_ROOT}/org.apache.ant/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -f #{SOURCE_ROOT}/com.ibm.devops.site/build/publish_results.xml -lib #{BUILD_TOOLKIT} -DbuildResultUUID=#{@build_result_uuid} -DrepositoryAddress=#{@repository_url} -DactivityIdProperty=#{activity_id} -DautoComplete=#{autocomplete} -Dlabel='#{progress_message}' #{task}`

This works fine when I don't try to use hierarchal progress (i.e. when I don't specify a parentActivityId). Whenever I try to call this and specify a parentActivityId, it always fails with the following message:

BUILD FAILED
com.ibm.team.build.common.TeamBuildException: The build activity with id "run_cookbook" does not exist in the build result.

... even though my logging and the build result clearly shows that the activity with activityIdProperty 'run_cookbook' did get created.

After a couple of hours of trying various things, I'm wondering if the problem is that I'm publishing each build activity in a separate Java process and the Ant task implementation for startBuildActivity stores the activity hierarchy in the Java program memory (meaning the hierarchy gets lost between each of my invocations of java).

Can someone with more knowledge of the build toolkit implementation please comment? Any recommendations on how to use hierarchal activities if you're using a non-Ant build? I'm following the guidance from this wiki page: https://jazz.net/wiki/bin/view/Main/CppBuild

0 votes



3 answers

Permanent link
I figured out what I was doing wrong.

I thought that I was supposed to specify an activity ID when I ran the startBuildActivity task. Now I realize that the activity IDs are always handed back to you essentially after you run startBuildActivity. That's why you specify 'activityIdProperty' instead of 'activityId' - the value of the activityId gets written back to the property specified by activityIdProperty.

I would suggest updating the documentation to provide an example of using a parent activity. The documentation is quite unhelpful at the moment w/r/t using parent activities.

0 votes


Permanent link
Created Task 174115: Improve documentation around startBuildActivity Ant task to improve documentation around hierarchal progress feedback.

0 votes


Permanent link
Created Task 174115: Improve documentation around startBuildActivity Ant task to improve documentation around hierarchal progress feedback.


Hi,

We'll have to take a look at the documentation. There is a Wiki page that gives more detail about activities.

Brent Ulbricht
RTC Build Lead

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Aug 13 '11, 4:49 p.m.

Question was seen: 5,474 times

Last updated: Aug 13 '11, 4:49 p.m.

Confirmation Cancel Confirm