I want to hide jenkins sh execute command in pipeline
pipeline {
agent any
stages {
stage(\'Load Lib\') {
steps {
This is definitely related to Echo off in Jenkins Console Output
For pipeline, what this means is:
pipeline {
agent any
stages {
stage('Load Lib') {
steps {
sh '''
set +x
s -al
set -x
'''
}
}
}
}
'''
indicates a multi line command. set +x
turns off command echoing, and set -x
turns it back on again.
You can override this behaviour for the whole script by putting the following at the top of the build step:
#!/bin/bash +x