Issue
Is there any builtin variable that gives access to the text of the currently executing build?
I tried using something like currentBuild.log
, currentBuild.buildLog
but without any luck.
Solution
Actually it is possible using currentBuild.rawBuild.log
or better (not deprecated) currentBuild.rawBuild.getLog(100)
(for the last 100 lines), reference: http://javadoc.jenkins-ci.org/hudson/model/Run.html#getLog-int-
Answered By - Krzysztof KrasoĊ
Answer Checked By - David Marino (JavaFixing Volunteer)