Search code examples
buildrtcjazzbuildengine

RTC how to add a log file into a build result


So far I met all preconditions to perform a build, i have - a build user, a build repository workspace - a build server with a running build engine - a build definition (command line) and a lot of build results...

When my build is running it creates some extra information in a build.log file...

How can I attach that file from the build server to the build result after the build job is done? (well - it should be done at the end of the build job, not after the job is done). The file should be added by the build job and not be added manually...

build file would be here

i know it should be easy, but honestly - i'm stuck a bit, maybe even ashamed to ask such an trivial question...


Solution

  • The easiest way to attach files to the RTC Build Result is by running the respective LogPublisher Ant Task.

    You will need to provide an RTC Build Toolkit, available for Download from jazz.net, and pass it via command line (example below).

    ant -lib /opt/rtc-build-toolkit/buildsystem/buildtoolkit
    

    It will obviously require you to add this command to your build script (or Jenkins if it's the case). Either way, it's much more simple than programatically. RTC API has its tricks. Not fun. :-)

    Just in case, IBM provides several other Ant Tasks for publishing stuff, see here.