Jenkinsfile build log

后端 未结 3 1156
梦如初夏
梦如初夏 2021-01-04 01:22

Is there any builtin variable that gives access to the text of the currently executing build?

I tried using something like currentBuild.log, curre

3条回答
  •  长发绾君心
    2021-01-04 02:07

    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-

提交回复
热议问题