Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make repository_uploader to support S3_FILES_TO_UPLOAD #1006

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions jenkins-scripts/lib/repository_uploader.bash
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,20 @@ case ${UPLOAD_TO_REPO} in
;;
esac

# .zip | (mostly) windows packages
for pkg in `ls $pkgs_path/*.zip`; do

# S3_FILES_TO_UPLOAD can contain a list of filenames relative to $pkgs_path that will be uploaded to S3
# together with any .zip (mostly old windows packages) if they exists
S3_FILES_TO_UPLOAD="${S3_FILES_TO_UPLOAD} $(find "$pkgs_path" -type f -name '*.zip' -printf '%f\n' || true)"

for pkg in ${S3_FILES_TO_UPLOAD}; do
# S3_UPLOAD_PATH should be send by the upstream job
if [[ -z ${S3_UPLOAD_PATH} ]]; then
echo "S3_UPLOAD_PATH was not defined. Not uploading"
exit 1
fi

# Seems important to upload the path with a final slash
S3_upload ${pkg} "${S3_UPLOAD_PATH}"
S3_upload "${pkgs_path}/${pkg}" "${S3_UPLOAD_PATH}"
done

# .bottle | brew binaries
Expand Down