Skip to content

Commit

Permalink
gitlab-ci: enable auto skip pending jobs/pipelines
Browse files Browse the repository at this point in the history
Needed to enable ability to skip running/pending jobs/pipelines in
running gitlab-ci queue on developers branches. As found this feature
had 2 special switching check boxes in gitlab-ci CI/CD configuration:
  https://gitlab.com/help/ci/pipelines/settings#auto-cancel-pending-pipelines

To make it workable the whole testing project in gitlab-ci must be
either with these options or w/o it. But in the same project there are
release branches testing, which must be run for each push and can't be
skipped. To resolve this issue found the single solution to split
gitlab-ci project in two:
  new one with testing on branches which can be skipped:
    https://gitlab.com/tarantool/tarantool-core-branches/
  and old one on branches that can't be skipped:
    https://gitlab.com/tarantool/tarantool/

Current patch can be pushed into release branches only after the new
gitlab-ci project https://gitlab.com/tarantool/tarantool-core-branches/
will be completely prepared as https://gitlab.com/tarantool/tarantool/.

Closes #5035
  • Loading branch information
avtikhon committed Jun 1, 2020
1 parent 9d08b0d commit 4d64dc5
Show file tree
Hide file tree
Showing 4 changed files with 586 additions and 431 deletions.
161 changes: 161 additions & 0 deletions .branches.gitlab-ci.yml
@@ -0,0 +1,161 @@
stages:
- test
- perf
- cleanup

variables:
PACK_RULE: package

.develope_only_template:
only:
- branches
- schedules
- external_pull_requests
- merge_requests

.full_only_template:
only:
- /^.*-full-ci$/
- schedules
- external_pull_requests
- merge_requests

.pack_only_template:
extends: .full_only_template

.perf_only_template:
only:
- /^.*-full-ci-perf$/
- /^.*-perf$/
- external_pull_requests
- merge_requests
except:
- schedules

# Jobs templates

include:
- '.templates.gitlab-ci.yml'
- '.perf.gitlab-ci.yml'

# Tests release and debug

release:
extends:
- .develope_only_template
- .test_release_template

debug:
extends:
- .develope_only_template
- .test_debug_template

# Clang builds (Clang/Clang+LTO/Clang8+LTO/Clang8+ASAN)

release_clang:
extends:
- .develope_only_template
- .test_release_clang_template

release_lto:
extends:
- .full_only_template
- .test_release_lto_template

release_lto_clang8:
extends:
- .full_only_template
- .test_release_lto_clang8_template

release_asan_clang8:
extends:
- .develope_only_template
- .test_release_asan_clang8_template

# Static builds w/ & w/o dockerfile

static_build:
extends:
- .develope_only_template
- .test_static_build_template

static_docker_build:
extends:
- .full_only_template
- .test_static_docker_build_template

# OSX builds (14/15/15+LTO)

osx_14_release:
extends:
- .full_only_template
- .test_osx_14_release_template

osx_15_release:
extends:
- .develope_only_template
- .test_osx_15_release_template

osx_15_release_lto:
extends:
- .full_only_template
- .test_osx_15_release_lto_template

# FreeBSD build

freebsd_12_release:
extends:
- .develope_only_template
- .test_freebsd_12_release_template

# Build only packages and sources

sources:
extends: .pack_template
script:
- ${GITLAB_MAKE} source

centos_6:
extends: .test_centos_6_template

centos_7:
extends: .test_centos_7_template

centos_8:
extends: .test_centos_8_template

fedora_28:
extends: .test_fedora_28_template

fedora_29:
extends: .test_fedora_29_template

fedora_30:
extends: .test_fedora_30_template

fedora_31:
extends: .test_fedora_31_template

ubuntu_14_04:
extends: .test_ubuntu_14_04_template

ubuntu_16_04:
extends: .test_ubuntu_16_04_template

ubuntu_18_04:
extends: .test_ubuntu_18_04_template

ubuntu_19_10:
extends: .test_ubuntu_19_10_template

ubuntu_20_04:
extends: .test_ubuntu_20_04_template

debian_8:
extends: .test_debian_8_template

debian_9:
extends: .test_debian_9_template

debian_10:
extends: .test_debian_10_template

0 comments on commit 4d64dc5

Please sign in to comment.