From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp17.mail.ru (smtp17.mail.ru [94.100.176.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 08B5643040C for ; Wed, 2 Sep 2020 14:46:33 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Wed, 2 Sep 2020 14:46:31 +0300 Message-Id: Subject: [Tarantool-patches] [PATCH v1] gitlab-ci: save sources to new S3 location List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin , Alexander Turenko Cc: tarantool-patches@dev.tarantool.org Changed S3 location for sources tarballs. Also added ability to create S3 directory for the tarballs if it was not existed. --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/src-s3-new .gitlab.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab.mk b/.gitlab.mk index 0ce978063..708c69082 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -108,6 +108,7 @@ GIT_DESCRIBE=$(shell git describe HEAD) MAJOR_VERSION=$(word 1,$(subst ., ,$(GIT_DESCRIBE))) MINOR_VERSION=$(word 2,$(subst ., ,$(GIT_DESCRIBE))) BUCKET="$(MAJOR_VERSION).$(MINOR_VERSION)" +S3_BUCKET="s3://tarantool_repo/sources/$(BUCKET)" deploy_prepare: [ -d packpack ] || \ @@ -130,8 +131,13 @@ source: deploy_prepare TARBALL_COMPRESSOR=gz packpack/packpack tarball source_deploy: source - aws --endpoint-url "${AWS_S3_ENDPOINT_URL}" s3 cp build/*.tar.gz \ - "s3://tarantool.${BUCKET}.src/" --acl public-read + ( aws --endpoint-url "${AWS_S3_ENDPOINT_URL}" s3 ls "${S3_BUCKET}/" || \ + ( rm -rf "${BUCKET}" ; mkdir "${BUCKET}" && \ + aws --endpoint-url "${AWS_S3_ENDPOINT_URL}" \ + s3 mv "${BUCKET}" "${S3_BUCKET}" --recursive \ + --acl public-read ) ) && \ + aws --endpoint-url "${AWS_S3_ENDPOINT_URL}" \ + s3 cp build/*.tar.gz "${S3_BUCKET}/" --acl public-read # ################### # Performance testing -- 2.17.1