如何在Jenkins的控制台输出中隐藏checkout scm步骤输出

问题描述 投票:0回答:1

我在Jenkinsfile(脚本管道)中的第一个阶段是checkout scm,它提供了关于GitHub检出和所有修订相关内容的简要描述,我不希望在Jenkins控制台输出中显示这些内容。

是否可以在Jenkins的控制台输出中隐藏它。以下控制台输出来自Jenkins的checkout scm步骤,我想隐藏它

Cloning the remote Git repository
Cloning repository https://github.com/forpi/cherry-pik.git
 > git init /home/ubuntu/.jenkins/workspace/Dummy-project # timeout=10
Fetching upstream changes from https://github.com/forpi/cherry-pik.git
 > git --version # timeout=10
 > git fetch --tags --progress https://github.com/forpi/cherry-pik.git +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url https://github.com/forpi/cherry-pik.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/forpi/cherry-pik.git # timeout=10
Fetching upstream changes from https://github.com/forpi/cherry-pik.git
 > git fetch --tags --progress https://github.com/forpi/cherry-pik.git +refs/heads/*:refs/remotes/origin/*

 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision b80c4d6b655429d7f84347b4192461cc3d68283e (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f b80c4d6b69c429d7f84347b4192461cc3d68283e
 > git branch -a -v --no-abbrev # timeout=10
 > git checkout -b master b80c4d6b655429d7f84347b4192461cc3d68283e
Commit message: "lets try this again" 
jenkins github devops
1个回答
0
投票

试试这个方便的插件:https://wiki.jenkins.io/display/JENKINS/Collapsing+Console+Sections+Plugin

它可能不是超级整洁,但它可以完成工作。

© www.soinside.com 2019 - 2024. All rights reserved.