From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Alexander Turenko <alexander.turenko@tarantool.org>
Cc: "Alexander V. Tikhonov" <avtikhon@tarantool.org>,
tarantool-patches@freelists.org
Subject: [tarantool-patches] [PATCH v1] gitlab-ci: clean up .gitlab-ci.yml
Date: Thu, 22 Aug 2019 11:23:42 +0300 [thread overview]
Message-ID: <2b6d5aa2cbe764e84419016789b0be8c62641449.1566462163.git.avtikhon@tarantool.org> (raw)
Cleaned up the .gitlab-ci.yml file from duplicating
code - added templates that storres the needed
configuration values for different jobs.
Also moved the static_build from 'deploy' tag to
'deploy_test' tag to be sure that tests will not
be run under high load.
---
Github: https://github.com/tarantool/tarantool/tree/avtikhon/check-full-ci
.gitlab-ci.yml | 253 ++++++++++++++-----------------------------------
1 file changed, 70 insertions(+), 183 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f160c276b..10246ad09 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,29 +6,65 @@ variables:
IMAGE_TEST_LTO: "${CI_REGISTRY}/${CI_PROJECT_PATH}/testing/debian-buster:latest"
GITLAB_MAKE: "make -f .gitlab.mk"
-# Tests
+# Jobs templates
-release:
+.release_only_template: &release_only_definition
+ only:
+ refs:
+ - master
+ - /^.*-full-ci$/
+
+.docker_test_template: &docker_test_definition
image: ${IMAGE_TEST}
stage: test
tags:
- docker_test
- script:
- - ${GITLAB_MAKE} test_debian_no_deps
-debug:
- image: ${IMAGE_TEST}
+.docker_test_lto_template: &docker_test_lto_definition
+ image: ${IMAGE_TEST_LTO}
stage: test
tags:
- docker_test
+
+.deploy_template: &deploy_definition
+ <<: *release_only_definition
+ image: ${IMAGE_TEST}
+ stage: test
+ tags:
+ - deploy
script:
- - ${GITLAB_MAKE} test_coverage_debian_no_deps
+ - ${GITLAB_MAKE} package
-release_clang:
+.deploy_test_template: &deploy_test_definition
+ <<: *release_only_definition
image: ${IMAGE_TEST}
stage: test
tags:
- - docker_test
+ - deploy_test
+ script:
+ - ${GITLAB_MAKE} package
+
+.vbox_template: &vbox_definition
+ stage: test
+ before_script:
+ - ${GITLAB_MAKE} vms_start
+ after_script:
+ - ${GITLAB_MAKE} vms_shutdown
+
+# Tests
+
+release:
+ <<: *docker_test_definition
+ script:
+ - ${GITLAB_MAKE} test_debian_no_deps
+
+debug:
+ <<: *docker_test_definition
+ script:
+ - ${GITLAB_MAKE} test_coverage_debian_no_deps
+
+release_clang:
+ <<: *docker_test_definition
variables:
CC: clang
CXX: clang++
@@ -36,28 +72,16 @@ release_clang:
- ${GITLAB_MAKE} test_debian_no_deps
release_lto:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- image: ${IMAGE_TEST_LTO}
- stage: test
- tags:
- - docker_test
+ <<: *release_only_definition
+ <<: *docker_test_lto_definition
variables:
CMAKE_EXTRA_PARAMS: -DENABLE_LTO=ON
script:
- ${GITLAB_MAKE} test_debian_no_deps
release_lto_clang8:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- image: ${IMAGE_TEST_LTO}
- stage: test
- tags:
- - docker_test
+ <<: *release_only_definition
+ <<: *docker_test_lto_definition
variables:
CC: clang-8
CXX: clang++-8
@@ -66,53 +90,36 @@ release_lto_clang8:
- ${GITLAB_MAKE} test_debian_no_deps
release_asan_clang8:
- image: ${IMAGE_TEST_LTO}
- stage: test
- tags:
- - docker_test
+ <<: *docker_test_lto_definition
script:
- ${GITLAB_MAKE} test_asan_debian_no_deps
osx_13_release:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
+ <<: *release_only_definition
+ <<: *vbox_definition
tags:
- vms_osx_13
variables:
VMS_NAME: 'osx_13'
VMS_USER: 'tarantool'
VMS_PORT: '2212'
- before_script:
- - ${GITLAB_MAKE} vms_start
script:
- ${GITLAB_MAKE} vms_test_osx
- after_script:
- - ${GITLAB_MAKE} vms_shutdown
osx_14_release:
- stage: test
+ <<: *vbox_definition
tags:
- vms_osx_14
variables:
VMS_NAME: 'osx_14'
VMS_USER: 'tarantool'
VMS_PORT: '2222'
- before_script:
- - ${GITLAB_MAKE} vms_start
script:
- ${GITLAB_MAKE} vms_test_osx
- after_script:
- - ${GITLAB_MAKE} vms_shutdown
osx_14_release_lto:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
+ <<: *release_only_definition
+ <<: *vbox_definition
tags:
- vms_osx_14
variables:
@@ -120,15 +127,11 @@ osx_14_release_lto:
VMS_NAME: 'osx_14'
VMS_USER: 'tarantool'
VMS_PORT: '2222'
- before_script:
- - ${GITLAB_MAKE} vms_start
script:
- ${GITLAB_MAKE} vms_test_osx
- after_script:
- - ${GITLAB_MAKE} vms_shutdown
freebsd_12_release:
- stage: test
+ <<: *vbox_definition
tags:
- vms_freebsd_12
variables:
@@ -136,206 +139,90 @@ freebsd_12_release:
VMS_USER: 'vagrant'
VMS_PORT: '2232'
MAKE: 'gmake'
- before_script:
- - ${GITLAB_MAKE} vms_start
script:
- ${GITLAB_MAKE} vms_test_freebsd
- after_script:
- - ${GITLAB_MAKE} vms_shutdown
# Packs
centos_6:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy
+ <<: *deploy_definition
variables:
OS: 'el'
DIST: '6'
- script:
- - ${GITLAB_MAKE} package
centos_7:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy_test
+ <<: *deploy_test_definition
variables:
OS: 'el'
DIST: '7'
- script:
- - ${GITLAB_MAKE} package
fedora_28:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy_test
+ <<: *deploy_test_definition
variables:
OS: 'fedora'
DIST: '28'
- script:
- - ${GITLAB_MAKE} package
fedora_29:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy_test
+ <<: *deploy_test_definition
variables:
OS: 'fedora'
DIST: '29'
- script:
- - ${GITLAB_MAKE} package
fedora_30:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy_test
+ <<: *deploy_test_definition
variables:
OS: 'fedora'
DIST: '30'
- script:
- - ${GITLAB_MAKE} package
ubuntu_14_04:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy
+ <<: *deploy_definition
variables:
OS: 'ubuntu'
DIST: 'trusty'
- script:
- - ${GITLAB_MAKE} package
ubuntu_16_04:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy
+ <<: *deploy_definition
variables:
OS: 'ubuntu'
DIST: 'xenial'
- script:
- - ${GITLAB_MAKE} package
ubuntu_18_04:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy
+ <<: *deploy_definition
variables:
OS: 'ubuntu'
DIST: 'bionic'
- script:
- - ${GITLAB_MAKE} package
ubuntu_18_10:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy
+ <<: *deploy_definition
variables:
OS: 'ubuntu'
DIST: 'cosmic'
- script:
- - ${GITLAB_MAKE} package
ubuntu_19_04:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy
+ <<: *deploy_definition
variables:
OS: 'ubuntu'
DIST: 'disco'
- script:
- - ${GITLAB_MAKE} package
debian_8:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy
+ <<: *deploy_definition
variables:
OS: 'debian'
DIST: 'jessie'
- script:
- - ${GITLAB_MAKE} package
debian_9:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy
+ <<: *deploy_definition
variables:
OS: 'debian'
DIST: 'stretch'
- script:
- - ${GITLAB_MAKE} package
debian_10:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy
+ <<: *deploy_definition
variables:
OS: 'debian'
DIST: 'buster'
- script:
- - ${GITLAB_MAKE} package
static_build:
- only:
- refs:
- - master
- - /^.*-full-ci$/
- stage: test
- tags:
- - deploy
+ <<: *deploy_test_definition
variables:
RUN_TESTS: 'ON'
- script:
- - ${GITLAB_MAKE} static_build
--
2.17.1
next reply other threads:[~2019-08-22 8:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 8:23 Alexander V. Tikhonov [this message]
2019-08-23 6:08 Alexander V. Tikhonov
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=2b6d5aa2cbe764e84419016789b0be8c62641449.1566462163.git.avtikhon@tarantool.org \
--to=avtikhon@tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [tarantool-patches] [PATCH v1] gitlab-ci: clean up .gitlab-ci.yml' \
/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