Jenkinsfile build log
问题 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. 回答1: 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- 回答2: I searched a lot for a solution to analyze the log. use rawBuild was not OK,