标签:commit plugin imp add pos 查看 recommend not evel
在 Jenkins Pipeline 中,控制台(Console Output)输出的日志包含大量 Pipeline 执行日志(如下以 [Pipeline] 为前缀的日志行):
...
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
The recommended git tool is: NONE
using credential GOGS-K4NZ
Fetching changes from the remote Git repository
Checking out Revision 91ff0e5ab827d5f1c9b17e47efe91d631841b060 (refs/remotes/origin/master)
Commit message: "# LZP # 2021/01/24 21:08:10"
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] withEnv
[Pipeline] {
[Pipeline] timeout
Timeout set to expire in 40 min
[Pipeline] {
[Pipeline] timestamps
[Pipeline] {
[Pipeline] stage
...
我们希望能够隐藏这些日志,否则会影响到我们查看日志。
方法一、使用 Simple Theme 插件
在 Manage Jenkins / Configure System / Theme 中,Add / Extra CSS,设置如下样式以隐藏:
.pipeline-new-node {
display: none;
}
方法二、使用 Log File Filter 插件(未验证)
我们的 Pipeline 比较复杂:1)对 Step 调用较多,日志冗长;2)我们还调用某些原始 Groovy 及 Java 方法,但是 Blue Ocean 插件只能显示 Step 相关的日志。因此并不适用我们的场景。
WikiNotes/隐藏 Pipeline 日志
Jenkins how to hide system level console output
[JENKINS-41845] Suppress default pipeline output - Jenkins Jira
djonsson/jenkins-atlassian-theme: Jenkins improved UI - Atlassian style
「Jenkins Pipeline」- 隐藏 Pipeline 日志 @20210204
标签:commit plugin imp add pos 查看 recommend not evel
原文地址:https://www.cnblogs.com/k4nz/p/14372099.html