From: "Alexander V. Tikhonov" <avtikhon@tarantool.org> To: Oleg Piskunov <o.piskunov@tarantool.org>, Sergey Bronnikov <sergeyb@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH v1] gitlab-ci: move sources tarball creation to gitlab Date: Tue, 14 Apr 2020 17:55:06 +0300 [thread overview] Message-ID: <6dc1d60dc287d22f3b850248c36404c1541d6284.1586876007.git.avtikhon@tarantool.org> (raw) 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 <major>x bucket (say, 2x), -# stable to <major>.<minor> 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
next reply other threads:[~2020-04-14 14:55 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-14 14:55 Alexander V. Tikhonov [this message] 2020-04-15 8:34 ` Sergey Bronnikov 2020-04-15 15:50 ` Oleg Piskunov 2020-04-15 16:05 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=6dc1d60dc287d22f3b850248c36404c1541d6284.1586876007.git.avtikhon@tarantool.org \ --to=avtikhon@tarantool.org \ --cc=o.piskunov@tarantool.org \ --cc=sergeyb@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v1] gitlab-ci: move sources tarball creation to gitlab' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox