This is an automated email from the ASF dual-hosted git repository.
zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new cdb01fc Don't fail storing test results if test suite got aborted
(#11363) (#11391)
cdb01fc is described below
commit cdb01fc72ec5c8973a5ed48076380721db50ffa8
Author: Marco de Abreu <[email protected]>
AuthorDate: Tue Jun 26 00:26:41 2018 +0200
Don't fail storing test results if test suite got aborted (#11363) (#11391)
* Dont fail during artifact storage
* Update Jenkinsfile
* Update Jenkinsfile
---
Jenkinsfile | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 44aad8e..10fdf1d 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -97,18 +97,23 @@ def publish_test_coverage() {
}
def collect_test_results_unix(original_file_name, new_file_name) {
- echo 'Saving python test results for ' + new_file_name
- // Rename file to make it distinguishable. Unfortunately, it's not
possible to get STAGE_NAME in a parallel stage
- sh 'cp ' + original_file_name + ' ' + new_file_name
- archiveArtifacts artifacts: new_file_name
+ if (fileExists(original_file_name)) {
+ // Rename file to make it distinguishable. Unfortunately, it's not
possible to get STAGE_NAME in a parallel stage
+ // Thus, we have to pick a name manually and rename the files so that
they can be stored separately.
+ sh 'cp ' + original_file_name + ' ' + new_file_name
+ archiveArtifacts artifacts: new_file_name
+ }
}
def collect_test_results_windows(original_file_name, new_file_name) {
- echo 'Saving python test results for ' + new_file_name
// Rename file to make it distinguishable. Unfortunately, it's not
possible to get STAGE_NAME in a parallel stage
- bat 'xcopy ' + original_file_name + ' ' + new_file_name + '*'
- archiveArtifacts artifacts: new_file_name
-}
+ // Thus, we have to pick a name manually and rename the files so that they
can be stored separately.
+ if (fileExists(original_file_name)) {
+ bat 'xcopy ' + original_file_name + ' ' + new_file_name + '*'
+ archiveArtifacts artifacts: new_file_name
+ }
+}
+
def docker_run(platform, function_name, use_nvidia, shared_mem = '500m') {
def command = "ci/build.py --docker-registry ${env.DOCKER_CACHE_REGISTRY}
%USE_NVIDIA% --platform %PLATFORM% --shm-size %SHARED_MEM%
/work/runtime_functions.sh %FUNCTION_NAME%"