Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can jenkins hide its "execute shell" command when running a job?

Tags:

jenkins

For Example if I put bash abc.sh in the "execute shell", The job output will be:

+ bash abc.sh
the output of the script

But what I want is only the output of this script, is there anything i can do to hide the + bash abc.sh?

Thanks in advance.

like image 563
Azarea Avatar asked Sep 26 '17 07:09

Azarea


People also ask

How do I hide console output in Jenkins?

You can type set +x before any command to temporary override that behavior. Of course you will need set -x to start showing them again.

Can Jenkins run shell script?

Using Jenkins built-in "Execute shell" you can run commands using unix shell. If you need to run a job cross platform you cannot use the two standard executors provided by Jenkins. You need a "build step" that can be executed both in Windows and in Unix.


1 Answers

It seems i find the answer....

set +x
<command>
set -x

This solves my problem.

like image 153
Azarea Avatar answered Oct 09 '22 21:10

Azarea