marcoabreu closed pull request #12784: Improved git reset for CI builds
URL: https://github.com/apache/incubator-mxnet/pull/12784
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/ci/Jenkinsfile_utils.groovy b/ci/Jenkinsfile_utils.groovy
index e2b08555d6a..43f296aacc5 100644
--- a/ci/Jenkinsfile_utils.groovy
+++ b/ci/Jenkinsfile_utils.groovy
@@ -26,8 +26,11 @@ def init_git() {
// retries as this will increase the amount of requests and worsen the
throttling
timeout(time: 15, unit: 'MINUTES') {
checkout scm
- sh 'git submodule update --init --recursive'
sh 'git clean -xdff'
+ sh 'git reset --hard'
+ sh 'git submodule update --init --recursive'
+ sh 'git submodule foreach --recursive git clean -ffxd'
+ sh 'git submodule foreach --recursive git reset --hard'
}
} catch (exc) {
deleteDir()
@@ -45,8 +48,11 @@ def init_git_win() {
// retries as this will increase the amount of requests and worsen the
throttling
timeout(time: 15, unit: 'MINUTES') {
checkout scm
- bat 'git submodule update --init --recursive'
bat 'git clean -xdff'
+ bat 'git reset --hard'
+ bat 'git submodule update --init --recursive'
+ bat 'git submodule foreach --recursive git clean -ffxd'
+ bat 'git submodule foreach --recursive git reset --hard'
}
} catch (exc) {
deleteDir()
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services