From 7765c53ecc0ca127890228eb7ddd482e0c16a043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Thu, 10 Jun 2021 08:01:16 +0200 Subject: [PATCH] mockbuild: use s3cmd put instead of sync to speed up the RPM upload s3cmd sync actually downloads metadata for all objects in a s3 bucket. We have built a lot of RPMs, thus this takes 5 minutes on AWS and 25 minutes on my laptop (!!!). Let's use recursive put instead. This doesn't delete any files on the remote side. As we upload RPMs only once, this also shouldn't fail on "the object already exists". Using this method, we should be able to upload the RPMs in seconds. The same patch was applied in osbuild-composer cf73edd2 --- schutzbot/mockbuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index 111c0d43..e48c8a9f 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -100,5 +100,5 @@ createrepo_c "${REPO_DIR}" # Upload repository to S3. greenprint "☁ Uploading RPMs to S3" pushd repo - s3cmd --acl-public sync . s3://${REPO_BUCKET}/ + s3cmd --acl-public put --recursive . s3://${REPO_BUCKET}/ popd