@@ -28,6 +28,7 @@ class GitCloneWorkflowStep implements StepPlugin, Describable{
2828
2929 public final static String GIT_URL = " gitUrl"
3030 public final static String GIT_BASE_DIRECTORY = " gitBaseDirectory"
31+ public final static String GIT_LOG_DISABLE = " gitLogDisable"
3132 public final static String GIT_BRANCH = " gitBranch"
3233 public final static String GIT_HOSTKEY_CHECKING = " strictHostKeyChecking"
3334 public final static String GIT_KEY_STORAGE = " gitKeyPath"
@@ -62,6 +63,8 @@ class GitCloneWorkflowStep implements StepPlugin, Describable{
6263 null ,null ,null , renderingOptionsConfig))
6364 .property(PropertyUtil . string(GIT_BRANCH , " Branch" , " Checkout branch." , true ,
6465 " master" ,null ,null , renderingOptionsConfig))
66+ .property(PropertyUtil . bool(GIT_LOG_DISABLE , " Disable log output" , " Enabling this flag, the plugin will not show the output log" , true ,
67+ " false" ,null , renderingOptionsConfig))
6568 .property(PropertyUtil . string(GIT_PASSWORD_STORAGE , " Git Password" , ' Password to authenticate remotely' , false ,
6669 null ,null ,null , renderingOptionsAuthenticationPassword))
6770 .property(PropertyUtil . select(GIT_HOSTKEY_CHECKING , " SSH: Strict Host Key Checking" , ''' Use strict host key checking.
@@ -126,11 +129,13 @@ If `yes`, require remote host SSH key is defined in the `~/.ssh/known_hosts` fil
126129 try {
127130 gitManager. cloneOrCreate(base)
128131
129- def jsonMap = base. listFiles(). collect {file ->
130- return [name : file. name, directory : file. directory, file : file. file, path : file. absolutePath]
132+ if (! Boolean . parseBoolean((String ) configuration. get(GIT_LOG_DISABLE ))) {
133+ def jsonMap = base. listFiles(). collect { file ->
134+ return [name : file. name, directory : file. directory, file : file. file, path : file. absolutePath]
135+ }
136+ def json = JsonOutput . toJson(jsonMap)
137+ logger. log(2 , json, meta)
131138 }
132- def json = JsonOutput . toJson(jsonMap)
133- logger. log(2 , json, meta)
134139
135140 }catch (Exception e){
136141 logger. log(0 , e. getMessage())
0 commit comments