Ant property or Java API call to get current build activity & build engine.
Is there any (public) way to tell what the current build activity is when running an RTC build?
I can look at the build in the RTC eclipse client and it will say "fetching files" or "Running Unit tests" (or whatever we specified using the last startBuildActivity task), but I'd like to be able to find this out from within the build, either as part of a Java build task or as an Ant property (that I can then send to my build task). I'd also like to be able to find the current build engine's name (which might not be the host name). Are either of these possible? (Using RTC 4.0.5) thanks |
One answer
If on the build definition ant tab you specify the properties file, this data will be provided
and in the build.xml load the properties file <loadproperties srcFile="./all.properties"/> for example, a little hello world java compile on my test system team.scm.includeComponents=false repositoryAddress=https\://localhost\:9143/ccm/ team.scm.fetchDestination=m\:\\builds\\test workpace buildDefinitionId=test project=hello world buildEngineHostName=sams team.scm.loadComponents= com.ibm.team.build.internal.template.id=com.ibm.team.build.ant team.scm.buildOnlyIfChanges=false team.scm.createFoldersForComponents=false team.scm.workspaceUUID=_0NDxEML_EeOZQPpfGt216g buildEngineId=testing buildLabel=20140418-0751 requestUUID=_Ge93gMb4EeOjy4RglL53dA buildRequesterUserId=sam buildResultUUID=_Ge93gcb4EeOjy4RglL53dA team.scm.acceptBeforeFetch=false team.scm.deleteDestinationBeforeFetch=true com.ibm.team.build.internal.engine.template.id=com.ibm.team.build.engine.jbe team.scm.componentLoadRules= com.ibm.team.build.internal.engine.monitoring.threshold=3 Comments
M Holder
commented May 08 '14, 3:16 p.m.
Thanks that's useful as it shows me all the available properties at startup so I can just use buildEngineId to get the build engine's name. (There is another far less pleasant way to get this using the java api but this is nicer)
see
Capturing an Activity IDfound withgoogle search string 'ant tasks site:jazz.net' |
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.