How to get the buildId of a running build

Is there a way to access buildlog during of a running build?

Background of this topic is the problem, to log the output of a makefile both to a specific logfile (to analyse compiler errors) and tc buildlog (to see current running status).

When using commands like "tee", the needed errorlevel of the make process is no more readable.

e.g.

make -r -f Y:\build\master\elf\nucleus\arion\master_elf_d\master_elf.GNUMake 2>&1 |tee Y:\logfiles\master\elf\nucleus\arion\master_elf_d\build_ARMGNUMAKE.log

To avoid this, i want to acess the tc buildlog ("http://server/downloadBuildLog.html?buildId=xxx") from a running script during the buildprocess. How do i get the suitable buildid of the running build?

1 comment

Build log is composed of build messages, these messages are sent by build runner to server immediately so there is no easy way to access build log on the agent. But I think you can do the following: if you can detect compilation errors in the build script you can produce correct teamcity-info.xml file with description of build failure and then fail the build. File containing compilation errors you can publish to server as artifact (if you'll be able to create an html file from it then you can add a custom tab on build results page).

Take a look at our documentation:
http://www.jetbrains.net/confluence/display/TCD3/BuildScriptInteractionwithTeamCity
http://www.jetbrains.net/confluence/display/TCD3/IncludingThird-PartyReportsintheBuildResults

--
Pavel Sher

0

Please sign in to leave a comment.