Jenkinsfile 构建日志

标签 jenkins jenkins-pipeline jenkins-workflow jenkinsfile

是否有任何内置变量可以访问当前正在执行的构建的文本?

我尝试使用类似 currentBuild.log 的东西, currentBuild.buildLog但没有任何运气。

最佳答案

实际上可以使用 currentBuild.rawBuild.log或更好(未弃用)currentBuild.rawBuild.getLog(100) (最后 100 行),引用:http://javadoc.jenkins-ci.org/hudson/model/Run.html#getLog-int-

关于Jenkinsfile 构建日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37018509/

相关文章:

svn - 在Docker容器启动上运行SVN更新脚本

msbuild - 让 StyleCop 和 Jenkins 听从我的命令

jenkins-pipeline - Kubernetes 插件-声明性管道-错误 : Node is not a Kubernetes node:

android - 将 build(apk) 上传到 hockeyApp 的管道脚本

jenkins - 在 Jenkins 管道中获取步骤 ID 以链接到 BlueOcean 或管道步骤 View (flowGraphTable)

jenkins - 闭包中的 Groovy 函数调用

php - 如何测试我的应用程序 phpunit - zend framework 2 中的每个模块

groovy - 如何从 Jenkins 工作流程调用 REST

java - 是否可以像在 gradle 中设置 sonar.sources 一样在 jenkins 中设置?