'How to silence the verbose rvm log in Jenkins job?
The thing is I'm loading RVM in Jenkins as a function due to bash "not a login" protection. That however outputs the whole RVM configuration to my log => first 8000 lines of log are useless to me.
Is there a way to tell Jenkins CI to silence (not to log) part of the bash script?
something like this
# silence begins
echo "this should not log
# silence end
echo 'this should log'
Thank you
Solution 1:[1]
What about suppress bash output instead of Jenkins?
I mean is this approach works good for you:
# silence begin
echo "this should not log" > /dev/null
# silence end
echo 'this should log'
This question looks like related to my answer.
update by Equivalent8:
this works, and for my situation I needed to use >&
:
# RVM setting
source ~/.bashrc >& /dev/null # load bashrc conf
source ~/.rvm/scripts/rvm >& /dev/null # standard RVM code
type rvm | head -1 # ensule rvm is is function mode
rvm use 2.1.2@my_project >& /dev/null # use ruby version
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Community |