From cf73edd2d2248bbb5e561a8beeab694857be2132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Wed, 14 Apr 2021 09:29:47 +0200 Subject: [PATCH] mockbuild: use s3cmd put instead of sync to speed up the RPM upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Ondřej Budai --- schutzbot/mockbuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index 9ca3e4507..a4e6b8426 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -119,5 +119,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