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

Fix aws s3 artifacts upload #772

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 1 addition & 5 deletions scripts/package_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ def s3_upload(files, dst):
ret = True
for f in files:
key = dst + utils.get_basename(f) if dst.endswith("/") else dst
aws_kwargs = { "acl": "public-read" }
if hasattr(branding, "s3_endpoint_url"):
aws_kwargs["endpoint_url"] = branding.s3_endpoint_url
upload = utils.s3_upload(
f, "s3://" + branding.s3_bucket + "/" + key, **aws_kwargs)
upload = utils.s3_upload(f, "s3://" + branding.s3_bucket + "/" + key)
if upload:
utils.add_deploy_data(key)
utils.log("URL: " + branding.s3_base_url + "/" + key)
Expand Down
14 changes: 3 additions & 11 deletions scripts/package_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,16 @@ def make_core():
return

utils.log_h2("core deploy")
aws_kwargs = { "acl": "public-read" }
if hasattr(branding, "s3_endpoint_url"):
aws_kwargs["endpoint_url"]=branding.s3_endpoint_url
ret = utils.s3_upload(
core_7z,
"s3://" + branding.s3_bucket + "/" + dest_version + "/core.7z",
**aws_kwargs)
"s3://" + branding.s3_bucket + "/" + dest_version + "/core.7z")
if ret:
utils.log("URL: " + branding.s3_base_url + "/" + dest_version + "/core.7z")
utils.add_deploy_data(dest_version + "/core.7z")
ret = utils.s3_sync(
"s3://" + branding.s3_bucket + "/" + dest_version + "/",
"s3://" + branding.s3_bucket + "/" + dest_latest + "/",
delete=True, **aws_kwargs)
delete=True)
utils.log("URL: " + branding.s3_base_url + "/" + dest_latest + "/core.7z")
utils.set_summary("core deploy", ret)
return
Expand All @@ -69,14 +65,10 @@ def deploy_closuremaps(license):
return

utils.log_h2("closure maps " + license + " deploy")
aws_kwargs = {}
if hasattr(branding, "s3_endpoint_url"):
aws_kwargs["endpoint_url"]=branding.s3_endpoint_url
ret = True
for f in maps:
key = "closure-maps/%s/%s/%s/%s" % (license, common.version, common.build, f)
upload = utils.s3_upload(
f, "s3://" + branding.s3_bucket + "/" + key, **aws_kwargs)
upload = utils.s3_upload(f, "s3://" + branding.s3_bucket + "/" + key)
ret &= upload
if upload:
utils.log("URL: " + branding.s3_base_url + "/" + key)
Expand Down
6 changes: 1 addition & 5 deletions scripts/package_desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ def s3_upload(files, dst):
ret = True
for f in files:
key = dst + utils.get_basename(f) if dst.endswith("/") else dst
aws_kwargs = { "acl": "public-read" }
if hasattr(branding, "s3_endpoint_url"):
aws_kwargs["endpoint_url"] = branding.s3_endpoint_url
upload = utils.s3_upload(
f, "s3://" + branding.s3_bucket + "/" + key, **aws_kwargs)
upload = utils.s3_upload(f, "s3://" + branding.s3_bucket + "/" + key)
if upload:
utils.add_deploy_data(key)
utils.log("URL: " + branding.s3_base_url + "/" + key)
Expand Down
6 changes: 1 addition & 5 deletions scripts/package_mobile.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ def make_mobile():
if ret:
utils.log_h2("mobile deploy")
key = "mobile/android/" + zip_file
aws_kwargs = { "acl": "public-read" }
if hasattr(branding, "s3_endpoint_url"):
aws_kwargs["endpoint_url"] = branding.s3_endpoint_url
ret = utils.s3_upload(
zip_file, "s3://" + branding.s3_bucket + "/" + key, **aws_kwargs)
ret = utils.s3_upload(zip_file, "s3://" + branding.s3_bucket + "/" + key)
if ret:
utils.add_deploy_data(key)
utils.log("URL: " + branding.s3_base_url + "/" + key)
Expand Down
6 changes: 1 addition & 5 deletions scripts/package_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ def s3_upload(files, dst):
ret = True
for f in files:
key = dst + utils.get_basename(f) if dst.endswith("/") else dst
aws_kwargs = { "acl": "public-read" }
if hasattr(branding, "s3_endpoint_url"):
aws_kwargs["endpoint_url"] = branding.s3_endpoint_url
upload = utils.s3_upload(
f, "s3://" + branding.s3_bucket + "/" + key, **aws_kwargs)
upload = utils.s3_upload(f, "s3://" + branding.s3_bucket + "/" + key)
if upload:
utils.add_deploy_data(key)
utils.log("URL: " + branding.s3_base_url + "/" + key)
Expand Down