Checking the build result from command line
One answer
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.
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?
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?