Hi,
I am using Jenkinsfile for scripting of a pipeline.
Is there any way to disable printing of executed shell commands in build
logs?
Here is just a simple example of a jenkins pipeline:
node{
stage ("Example") {
sh('echo shellscript.sh arg1 arg2')
sh('echo shellscript.sh arg3 arg4')
}
}
which produces the following output in console log:
[Pipeline] node
Running on master in /var/lib/jenkins/workspace/testpipeline
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Test)
[Pipeline] sh
[testpipeline] Running shell script
+ echo shellscript.sh arg1 arg2
shellscript.sh arg1 arg2
[Pipeline] sh
[testpipeline] Running shell script
+ echo shellscript.sh arg3 arg4
shellscript.sh arg3 arg4
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS
Basically I would like to disable printing of the commands itself.
+ echo shellscript.sh arg1 arg2
+ echo shellscript.sh arg3 arg4
Command-line arguments contain sensitive information that should not be
stored in logs.
Thanks
Vasyl
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/fec990f8-f357-4361-8266-9dcf48d4fd96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.