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

Checking the build result from command line

In 2.0.0.2, is there a way to check the status of a build from the command line?

0 votes



One answer

Permanent link
The closest thing we have to a command line tool for Build is the Ant tasks.
They work in pretty low level terms, though, since they're intended for use by automated build scripts, rather than humans.
For example, builds are identified by their item id (a UUID). You can obtain this from the last segment of the result of Copy URL on a build result in the IDE.

I defined the following Ant script, called buildstatus.xml.

<project name="buildStatus" default="buildStatus">

<taskdef name="waitForTeamBuild" classname="com.ibm.team.build.ant.task.WaitForTeamBuildTask"/>

<property name="repositoryAddress" value="https://jbslnxvh04.ottawa.ibm.com:9443/jazz"/>
<property name="userId" value="nedgar"/>
<property name="passwordFile" value="/Users/nedgar/Work/pass"/>

<target name="buildStatus">
<waitForTeamBuild
repositoryAddress="${repositoryAddress}" buildResultUUID="${buildResultUUID}" userId="${userId}" passwordFile="${passwordFile}"
statesToWaitFor="NOT_STARTED,CANCELED,IN_PROGRESS,INCOMPLETE,COMPLETED" timeOut="2" interval="1"
buildStateProperty="buildState" buildStatusProperty="buildStatus"/>
<echo message="build state: ${buildState}, status: ${buildStatus}"/>
</target>

</project>


I can then do:

ant -f buildstatus.xml -lib {path to buildtoolkit directory} -q -DbuildResultUUID=_Hkm1wYStEd--Je62z2AkVQ

which outputs, e.g.
build state: COMPLETED, status: OK

Here, the build result UUID is _Hkm1wYStEd--Je62z2AkVQ, obtained manually from the build result's URL.

I had previously set up the password file using:
jbe -createPasswordFile ~/Work/pass

Does this help for your scenario? If not, can you provide more details about what you're trying to do?

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: Jul 09 '10, 1:57 p.m.

Question was seen: 4,790 times

Last updated: Jul 09 '10, 1:57 p.m.

Confirmation Cancel Confirm