Thanks for the response.

Tried with "#!/bin/sh -e". Still everything gets logged to console.




Sent from Outlook<http://aka.ms/weboutlook>


________________________________
From: jenkinsci-users@googlegroups.com <jenkinsci-users@googlegroups.com> on 
behalf of Victor Martinez <victormartinezru...@gmail.com>
Sent: Monday, October 24, 2016 9:48 PM
To: Jenkins Users
Cc: peter.teich...@nagra.com
Subject: Re: disable/hide logging of shell script content to console log

Jenkins uses the shebang, by default

#!/bin/sh -xe

-x will prompt those verbose details, if you'd like to reset that you can set 
the default shebang in your shell build step with something like

#!/bin/sh -e

# add whatever you'd like to do

Cheers


On Monday, 24 October 2016 16:35:03 UTC+1, Teichner Peter wrote:
You can hide your output away from the script by redirecting the output to 
/dev/null but I think this the most you can do - the commands that you write 
will still be displayed.

From: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] On 
Behalf Of Bhushan Kittur
Sent: 24 October 2016 16:31
To: jenkins...@googlegroups.com
Subject: disable/hide logging of shell script content to console log


Hello Everyone,



I am using "Execute shell script on remote host using SSH" under Build section 
of the Job config with lines of shell script placed there.

And see all lines from the shell script are logged into Jenkins console log 
during job's execution.

Ex:

tarted by user anonymous<http://localhost:8080/jenkins/user/null>

[EnvInject] - Loading node environment variables.

Building in workspace ...

[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.



executing script:

target_env="dev"

var1=${target_env}

key="test123"

branchName=dev_feature1

startDeploy()



case "$var1" in



dev )



.

.

.

esac



 So is there a way to disable/hide shell script contents from logging into 
Jenkins console output of the job.



Sent from Outlook<http://aka.ms/weboutlook>
--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/HK2PR03MB1857371344C566364709E32FA8A90%40HK2PR03MB1857.apcprd03.prod.outlook.com<https://groups.google.com/d/msgid/jenkinsci-users/HK2PR03MB1857371344C566364709E32FA8A90%40HK2PR03MB1857.apcprd03.prod.outlook.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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 
jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4eece697-0b72-46a5-aff6-405433d0947b%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/4eece697-0b72-46a5-aff6-405433d0947b%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/HK2PR03MB1857751055C66D07EEBAE84DA8A90%40HK2PR03MB1857.apcprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to