From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp3.mail.ru (smtp3.mail.ru [94.100.179.58]) (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 4FC004696C3 for ; Tue, 14 Apr 2020 17:55:09 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Tue, 14 Apr 2020 17:55:06 +0300 Message-Id: <6dc1d60dc287d22f3b850248c36404c1541d6284.1586876007.git.avtikhon@tarantool.org> Subject: [Tarantool-patches] [PATCH v1] gitlab-ci: move sources tarball creation to gitlab List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Oleg Piskunov , Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Moved sources tarball creation from travis-ci to gitlab-ci, moved its jobs for sources packing and sources deploying. Close #4895 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4895-sources-to-gitlab-full-ci Issue: https://github.com/tarantool/tarantool/issues/4895 .gitlab-ci.yml | 12 +++++++++++- .gitlab.mk | 22 +++++++++++++++++----- .travis.mk | 32 -------------------------------- .travis.yml | 20 -------------------- 4 files changed, 28 insertions(+), 58 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd710027f..a37c1ba6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -261,7 +261,12 @@ remove_images: script: - ${GITLAB_MAKE} perf_cleanup -# Packs +# Packages and sources + +sources: + <<: *pack_definition + script: + - ${GITLAB_MAKE} source centos_6: <<: *pack_definition @@ -355,6 +360,11 @@ debian_10: # Deploy +sources_deploy: + <<: *deploy_definition + script: + - ${GITLAB_MAKE} source_deploy + centos_6_deploy: <<: *deploy_definition variables: diff --git a/.gitlab.mk b/.gitlab.mk index 9c0b85cfe..7079b489c 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -110,17 +110,22 @@ vms_test_%: vms_shutdown: VBoxManage controlvm ${VMS_NAME} poweroff -# ######## -# Packages -# ######## +# ###### +# Deploy +# ###### 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)" -package: git_submodule_update - git clone https://github.com/packpack/packpack.git packpack +deploy_prepare: git_submodule_update + pip install awscli --user + [ -d packpack ] || \ + git clone https://github.com/packpack/packpack.git packpack + rm -rf build + +package: deploy_prepare PACKPACK_EXTRA_DOCKER_RUN_PARAMS='--network=host' ./packpack/packpack deploy: package @@ -132,6 +137,13 @@ deploy: package -b="${RELEASE_REPO_S3_DIR}/${BUCKET}" build ; \ fi +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 + # ################### # Performance testing # ################### diff --git a/.travis.mk b/.travis.mk index f709a18b6..ad09ea6ad 100644 --- a/.travis.mk +++ b/.travis.mk @@ -211,35 +211,3 @@ test_freebsd_no_deps: build_freebsd cd test && python2.7 test-run.py --force $(TEST_RUN_EXTRA_PARAMS) test_freebsd: deps_freebsd test_freebsd_no_deps - -#################### -# Sources tarballs # -#################### - -source: - git clone https://github.com/packpack/packpack.git packpack - TARBALL_COMPRESSOR=gz packpack/packpack tarball - -# Push alpha and beta versions to x bucket (say, 2x), -# stable to . bucket (say, 2.2). -ifeq ($(TRAVIS_BRANCH),master) -GIT_DESCRIBE=$(shell git describe HEAD) -MAJOR_VERSION=$(word 1,$(subst ., ,$(GIT_DESCRIBE))) -MINOR_VERSION=$(word 2,$(subst ., ,$(GIT_DESCRIBE))) -else -MAJOR_VERSION=$(word 1,$(subst ., ,$(TRAVIS_BRANCH))) -MINOR_VERSION=$(word 2,$(subst ., ,$(TRAVIS_BRANCH))) -endif -BUCKET=tarantool.$(MAJOR_VERSION).$(MINOR_VERSION).src -ifeq ($(MINOR_VERSION),0) -BUCKET=tarantool.$(MAJOR_VERSION)x.src -endif -ifeq ($(MINOR_VERSION),1) -BUCKET=tarantool.$(MAJOR_VERSION)x.src -endif - -source_deploy: - pip install awscli --user - aws --endpoint-url "${AWS_S3_ENDPOINT_URL}" s3 \ - cp build/*.tar.gz "s3://${BUCKET}/" \ - --acl public-read diff --git a/.travis.yml b/.travis.yml index c63ab3ebd..593ef7474 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,9 +34,6 @@ jobs: - name: "Debug build + test + coverage (Linux, gcc)" env: TARGET=coverage # Deploy targets (they also catch distro-specific problems). - - name: "Create and deploy tarball" - env: TARGET=source - if: branch = "master" - name: "CentOS 6 build + deploy RPM" env: OS=el DIST=6 if: branch = "master" @@ -102,14 +99,6 @@ deploy: repo: tarantool/tarantool branch: "master" condition: -n "${OS}" && -n "${DIST}" && -n "${PACKAGECLOUD_TOKEN}" - # Deploy source tarballs to S3 from master branch (w/o tagged revisions) - - provider: script - script: make -f .travis.mk source_deploy - skip_cleanup: true - on: - repo: tarantool/tarantool - branch: "master" - condition: "x${TARGET} = xsource" # Deploy packages to PackageCloud from tagged revisions # https://github.com/travis-ci/travis-ci/issues/7780#issuecomment-302389370 - provider: packagecloud @@ -123,15 +112,6 @@ deploy: repo: tarantool/tarantool tags: true condition: -n "${OS}" && -n "${DIST}" && -n "${PACKAGECLOUD_TOKEN}" - # Deploy source tarballs to S3 from tagged revisions - # https://github.com/travis-ci/travis-ci/issues/7780#issuecomment-302389370 - - provider: script - script: make -f .travis.mk source_deploy - skip_cleanup: true - on: - repo: tarantool/tarantool - tags: true - condition: "x${TARGET} = xsource" notifications: email: -- 2.17.1