Skip to content

Commit

Permalink
test: replace s3cmd calls with aws s3
Browse files Browse the repository at this point in the history
Quick tests showed that the sync operation is much faster with awscli2
than with s3cmd.
  • Loading branch information
achilleas-k committed Jan 17, 2024
1 parent 9122312 commit 99028d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions test/scripts/imgtestlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,9 @@ def dl_s3_configs(destination):

print(f"⬇️ Downloading configs from {s3url}")
# only download info.json (exclude everything, then include) files, otherwise we get manifests and whole images
job = sp.run(["s3cmd", *s3_auth_args(), "sync",
job = sp.run(["aws", "s3", "sync",
"--exclude=*",
"--include=info.json",
"--delete-removed",
"--include=*/info.json",
s3url, destination],
capture_output=True,
check=False)
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/upload-results
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def main():
s3url = f"{bucket}/images/builds/{distro}/{arch}/{manifest_id}/"

print(f"⬆️ Uploading {build_dir} to {s3url}")
testlib.runcmd(["s3cmd", *testlib.s3_auth_args(), "--acl-private", "put", "--recursive", build_dir+"/", s3url])
testlib.runcmd(["aws", "s3", "cp", "--acl=private", "--recursive", build_dir+"/", s3url])
print("✅ DONE!!")


Expand Down

0 comments on commit 99028d3

Please sign in to comment.