forked from ufz/ogs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
71 lines (68 loc) · 2.91 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
stages:
- preparation
- build
- check
- release
- package
variables:
# Build config
BUILD_TYPE: Release
BUILD_TESTS: "true"
BUILD_CTEST: "true"
CTEST_ARGS: "" # If not empty supply arguments to select tests
CTEST_TIMEOUT: "" # in minutes
CPU_TARGET: ivybridge # envinf1 has oldest cpu
ARTIFACTS_PAGES_URL: https://$CI_PROJECT_ROOT_NAMESPACE.$CI_PAGES_DOMAIN/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts
PIPELINE_NAME: "Default pipeline name"
workflow:
name: "$PIPELINE_NAME"
rules:
# Disable CI for non-MR user-scoped pipelines
- if: '$CI_MERGE_REQUEST_IID == null && $CI_PROJECT_PATH != "ogs/ogs"'
when: never
- if: "$CI_MERGE_REQUEST_LABELS =~ /.*(workflow::paused|ci::skip).*/"
when: never
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::web only.*/
variables:
PIPELINE_NAME: "web only MR pipeline: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
BUILD_TESTS: "false"
CTEST_INCLUDE_REGEX: "nb-"
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::linux only.*/
variables:
PIPELINE_NAME: "linux only MR pipeline: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::mac only.*/
variables:
PIPELINE_NAME: "mac only MR pipeline: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::win only.*/
variables:
PIPELINE_NAME: "win only MR pipeline: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
- if: $CI_MERGE_REQUEST_IID # merge requests
variables:
PIPELINE_NAME: "MR pipeline: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
- if: $CI_COMMIT_TAG # tags, ogs/ogs repo only
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_PATH == "ogs/ogs"' # master, ogs/ogs repo only
variables:
PIPELINE_NAME: "master pipeline"
- if: '$CI_COMMIT_BRANCH =~ /^v[0-9]\.[0-9]\.[0-9]/ && $CI_PROJECT_PATH == "ogs/ogs"' # release branches, e.g. v6.x.x
variables:
PIPELINE_NAME: "bugfix branch $CI_COMMIT_BRANCH pipeline"
include:
- local: "scripts/ci/extends/*.yml"
- local: "/scripts/ci/pipelines/regular.yml"
rules:
- if: $CI_PIPELINE_SOURCE != "schedule" && $CI_MERGE_REQUEST_LABELS !~ /.*ci::\w* only.*/
- local: "/scripts/ci/pipelines/web.yml"
rules:
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::web only.*/
- local: "/scripts/ci/pipelines/scheduled.yml"
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- local: "/scripts/ci/pipelines/linux.yml"
rules:
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::linux only.*/
- local: "/scripts/ci/pipelines/mac.yml"
rules:
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::mac only.*/
- local: "/scripts/ci/pipelines/win.yml"
rules:
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::win only.*/