[CI] [Hotfix] Make S3 upload conditional

This commit is contained in:
Hyunsu Cho 2024-06-26 06:21:46 -07:00
parent 08658b124d
commit 5efc979551
No known key found for this signature in database
GPG Key ID: E3928C6ED5A562F4
3 changed files with 9 additions and 9 deletions

View File

@ -20,10 +20,10 @@ pushd lib
libname=libxgboost4j_linux_arm64_${BUILDKITE_COMMIT}.so
mv -v libxgboost4j.so ${libname}
buildkite-agent artifact upload ${libname}
#if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
#then
if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
then
aws s3 cp ${libname} \
s3://xgboost-nightly-builds/${BRANCH_NAME}/libxgboost4j/ \
--acl public-read --no-progress
#fi
fi
popd

View File

@ -20,10 +20,10 @@ pushd lib
libname=libxgboost4j_linux_x86_64_${BUILDKITE_COMMIT}.so
mv -v libxgboost4j.so ${libname}
buildkite-agent artifact upload ${libname}
#if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
#then
if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
then
aws s3 cp ${libname} \
s3://xgboost-nightly-builds/${BRANCH_NAME}/libxgboost4j/ \
--acl public-read --no-progress
#fi
fi
popd

View File

@ -31,11 +31,11 @@ pushd lib
libname=libxgboost4j_m1_${BUILDKITE_COMMIT}.dylib
mv -v libxgboost4j.dylib ${libname}
buildkite-agent artifact upload ${libname}
#if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
#then
if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
then
aws s3 cp ${libname} \
s3://xgboost-nightly-builds/${BRANCH_NAME}/libxgboost4j/ \
--acl public-read --no-progress
#fi
fi
popd
set +x