zachgk commented on a change in pull request #13450: [WIP][MXNET-862] Basic 
maven jenkins pipeline
URL: https://github.com/apache/incubator-mxnet/pull/13450#discussion_r238878873
 
 

 ##########
 File path: ci/Jenkinsfile_utils.groovy
 ##########
 @@ -18,18 +18,23 @@
 // under the License.
 
 // initialize source codes
-def init_git() {
+// Clean - 0: None, 1: xdf, 2: xdff
+def init_git(clean=2) {
   deleteDir()
   retry(5) {
     try {
       // Make sure wait long enough for api.github.com request quota. 
Important: Don't increase the amount of
       // retries as this will increase the amount of requests and worsen the 
throttling
       timeout(time: 15, unit: 'MINUTES') {
         checkout scm
-        sh 'git clean -xdff'
+        if(clean == 1)
+          clean = 'git clean -xdf'
+        else if(clean == 2)
+          clean = 'git clean -xdff'
 
 Review comment:
   This change is not to persist something in between stages. During maven 
deploy, it attempts to move all code into a temp directory, rebuild, and deploy 
from that temp directory. The rebuilding calls "git submodule update" which 
breaks if the .git directory has already been cleaned with "-ff" since the 
submodule configuration is deleted. I keep the default as "clean -xdff" so that 
keeping the .git directory must be explicitly chosen and does not affect any 
other code.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to