marcoabreu commented on a change in pull request #16336: S3 upload artifacts
URL: https://github.com/apache/incubator-mxnet/pull/16336#discussion_r330234698
##########
File path: ci/Jenkinsfile_utils.groovy
##########
@@ -150,12 +149,11 @@ def collect_test_results_windows(original_file_name,
new_file_name) {
if (fileExists(original_file_name)) {
bat 'xcopy ' + original_file_name + ' ' + new_file_name + '*'
archiveArtifacts artifacts: new_file_name
- if (env.BRANCH_NAME == "master") {
- try {
- s3Upload(file:new_file_name,
bucket:env.MXNET_CI_UNITTEST_ARTIFACT_BUCKET,
path:utils.get_git_commit_hash().trim()+"-"+env.BUILD_TAG+"/"+new_file_name)
- } catch (Exception e) {
- sh "S3 Upload failed ${e}"
- }
+ try {
+ s3Upload(file:new_file_name,
bucket:env.MXNET_CI_UNITTEST_ARTIFACT_BUCKET,
path:env.BRANCH_NAME+"-"+utils.get_git_commit_hash().trim()+"-"+env.BUILD_TAG+"/"+new_file_name)
Review comment:
I'm afraid that the folder starts to get too much context into its name
which isn't really scalable.
I'd propose to create a context file (outside of this function since the
function is called multiple times per run) where you store all the context
you're interested in. The folder names should only look like "PR-12345/22" or
"master/852". Everything else like commit hash, target branch, etc should then
go into the context file.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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