* [tarantool-patches] [PATCH v1] gitlab-ci: clean up .gitlab-ci.yml
@ 2019-08-23 6:08 Alexander V. Tikhonov
2019-08-23 11:54 ` [tarantool-patches] " Alexander Turenko
0 siblings, 1 reply; 4+ messages in thread
From: Alexander V. Tikhonov @ 2019-08-23 6:08 UTC (permalink / raw)
To: Alexander Turenko; +Cc: Alexander V. Tikhonov, tarantool-patches
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, 69 insertions(+), 184 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f160c276b..49047105a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,29 +6,63 @@ 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
+ stage: test
+ tags:
+ - deploy
script:
- - ${GITLAB_MAKE} test_coverage_debian_no_deps
+ - ${GITLAB_MAKE} package
-release_clang:
- image: ${IMAGE_TEST}
+.deploy_test_template: &deploy_test_definition
+ <<: *release_only_definition
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 +70,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 +88,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 +125,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 +137,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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tarantool-patches] Re: [PATCH v1] gitlab-ci: clean up .gitlab-ci.yml
2019-08-23 6:08 [tarantool-patches] [PATCH v1] gitlab-ci: clean up .gitlab-ci.yml Alexander V. Tikhonov
@ 2019-08-23 11:54 ` Alexander Turenko
2019-08-23 12:41 ` [tarantool-patches] " Alexander Tikhonov
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Turenko @ 2019-08-23 11:54 UTC (permalink / raw)
To: Alexander V. Tikhonov; +Cc: tarantool-patches
The approach is okay for me. Found two mistakes. Please, fix them,
verify all jobs again and pass the patch to Kirill.
WBR, Alexander Turenko.
> release_asan_clang8:
> - image: ${IMAGE_TEST_LTO}
> - stage: test
> - tags:
> - - docker_test
> + <<: *docker_test_lto_definition
> script:
> - ${GITLAB_MAKE} test_asan_debian_no_deps
No -DENABLE_LTO=ON cmake flag. It seems that there was no before.
> static_build:
> - only:
> - refs:
> - - master
> - - /^.*-full-ci$/
> - stage: test
> - tags:
> - - deploy
> + <<: *deploy_test_definition
> variables:
> RUN_TESTS: 'ON'
> - script:
> - - ${GITLAB_MAKE} static_build
static build now runs debian packages build.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tarantool-patches] Re: [tarantool-patches] Re: [PATCH v1] gitlab-ci: clean up .gitlab-ci.yml
2019-08-23 11:54 ` [tarantool-patches] " Alexander Turenko
@ 2019-08-23 12:41 ` Alexander Tikhonov
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Tikhonov @ 2019-08-23 12:41 UTC (permalink / raw)
To: tarantool-patches
[-- Attachment #1: Type: text/plain, Size: 1054 bytes --]
>Пятница, 23 августа 2019, 14:54 +03:00 от Alexander Turenko <alexander.turenko@tarantool.org>:
>
>The approach is okay for me. Found two mistakes. Please, fix them,
>verify all jobs again and pass the patch to Kirill.
>
>WBR, Alexander Turenko.
>
>> release_asan_clang8:
>> - image: ${IMAGE_TEST_LTO}
>> - stage: test
>> - tags:
>> - - docker_test
>> + <<: *docker_test_lto_definition
>> script:
>> - ${GITLAB_MAKE} test_asan_debian_no_deps
>
>No -DENABLE_LTO=ON cmake flag. It seems that there was no before.
In real the template doesn't have this variable, to avoid of the misleading in the feature renamed the template *lto* -> *clang8*.
>
>
>> static_build:
>> - only:
>> - refs:
>> - - master
>> - - /^.*-full-ci$/
>> - stage: test
>> - tags:
>> - - deploy
>> + <<: *deploy_test_definition
>> variables:
>> RUN_TESTS: 'ON'
>> - script:
>> - - ${GITLAB_MAKE} static_build
>
>static build now runs debian packages build.
>
Thanks a lot, misspelled - fixed.
--
Alexander Tikhonov
[-- Attachment #2: Type: text/html, Size: 1751 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tarantool-patches] [PATCH v1] gitlab-ci: clean up .gitlab-ci.yml
@ 2019-08-22 8:23 Alexander V. Tikhonov
0 siblings, 0 replies; 4+ messages in thread
From: Alexander V. Tikhonov @ 2019-08-22 8:23 UTC (permalink / raw)
To: Alexander Turenko; +Cc: Alexander V. Tikhonov, tarantool-patches
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-23 12:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23 6:08 [tarantool-patches] [PATCH v1] gitlab-ci: clean up .gitlab-ci.yml Alexander V. Tikhonov
2019-08-23 11:54 ` [tarantool-patches] " Alexander Turenko
2019-08-23 12:41 ` [tarantool-patches] " Alexander Tikhonov
-- strict thread matches above, loose matches on Subject: below --
2019-08-22 8:23 [tarantool-patches] " Alexander V. Tikhonov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox