@@ -6,7 +6,6 @@ import com.dtolabs.rundeck.core.plugins.Plugin
66import com.dtolabs.rundeck.core.plugins.configuration.Describable
77import com.dtolabs.rundeck.core.plugins.configuration.Description
88import com.dtolabs.rundeck.core.plugins.configuration.PropertyUtil
9- import com.dtolabs.rundeck.plugins.PluginLogger
109import com.dtolabs.rundeck.plugins.ServiceNameConstants
1110import com.dtolabs.rundeck.core.plugins.configuration.PropertyScope
1211import com.dtolabs.rundeck.plugins.descriptions.PluginDescription
@@ -29,6 +28,7 @@ class GitCloneWorkflowStep implements StepPlugin, Describable{
2928
3029 public final static String GIT_URL = " gitUrl"
3130 public final static String GIT_BASE_DIRECTORY = " gitBaseDirectory"
31+ public final static String GIT_LOG_DISABLE = " gitLogDisable"
3232 public final static String GIT_BRANCH = " gitBranch"
3333 public final static String GIT_HOSTKEY_CHECKING = " strictHostKeyChecking"
3434 public final static String GIT_KEY_STORAGE = " gitKeyPath"
@@ -63,6 +63,8 @@ class GitCloneWorkflowStep implements StepPlugin, Describable{
6363 null ,null ,null , renderingOptionsConfig))
6464 .property(PropertyUtil . string(GIT_BRANCH , " Branch" , " Checkout branch." , true ,
6565 " 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))
6668 .property(PropertyUtil . string(GIT_PASSWORD_STORAGE , " Git Password" , ' Password to authenticate remotely' , false ,
6769 null ,null ,null , renderingOptionsAuthenticationPassword))
6870 .property(PropertyUtil . select(GIT_HOSTKEY_CHECKING , " SSH: Strict Host Key Checking" , ''' Use strict host key checking.
@@ -127,11 +129,13 @@ If `yes`, require remote host SSH key is defined in the `~/.ssh/known_hosts` fil
127129 try {
128130 gitManager. cloneOrCreate(base)
129131
130- def jsonMap = base. listFiles(). collect {file ->
131- 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)
132138 }
133- def json = JsonOutput . toJson(jsonMap)
134- logger. log(2 , json, meta)
135139
136140 }catch (Exception e){
137141 logger. log(0 , e. getMessage())
0 commit comments