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:* [email protected] <javascript:> [mailto:
> [email protected] <javascript:>] *On Behalf Of *Bhushan Kittur
> *Sent:* 24 October 2016 16:31
> *To:* [email protected] <javascript:>
> *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 [email protected] <javascript:>.
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4eece697-0b72-46a5-aff6-405433d0947b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to