-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
184 lines (165 loc) · 5.83 KB
/
.gitlab-ci.yml
File metadata and controls
184 lines (165 loc) · 5.83 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
---
# General setup
# Basic configuration to guard against double-pipelines
workflow:
rules:
# This workflow entry does two things:
# - it allows pipelines for push events (including force-push, push of fixup
# commits, rebase, etc.)
# - it allows pipelines for schedules events in which case it checks the
# TZ_SCHEDULE_KIND which must be set in the pipeline scheduling interface
# In either case it sets the TZ_PIPELINE_KIND variable to allow jobs to
# selectively run on some pipelines but not all.
# See https://docs.gitlab.com/ee/ci/yaml/README.html#workflow for additional
# details.
- if: '$CI_PIPELINE_SOURCE == "push"'
variables:
TZ_PIPELINE_KIND: "PUSH"
when: always
- if: '$CI_PIPELINE_SOURCE == "schedule" && $TZ_SCHEDULE_KIND == "EXTENDED_TESTS"'
variables:
TZ_PIPELINE_KIND: "SCHEDULE"
when: always
- when: never # default
variables:
## This value MUST be the same as `opam_repository_tag` in `scripts/version.sh`
build_deps_image_version: 3255e6db26adf18182ec5d26ed2a9debf7a418bc
build_deps_image_name: registry.gitlab.com/tezos/opam-repository
public_docker_image_name: docker.io/${CI_PROJECT_PATH}-
GIT_STRATEGY: fetch
GIT_DEPTH: "1"
GET_SOURCES_ATTEMPTS: "2"
ARTIFACT_DOWNLOAD_ATTEMPTS: "2"
# The "manual" stage exists to fix a UI problem that occurs when mixing
# manual and non-manual jobs.
stages:
- build
- sanity_ci
- test
- doc
- packaging
- build_release
- publish_release
- test_coverage
- publish_coverage
- manual
# Basic, specialised, minimal, orthogonal templates
# Some settings we want by default on all jobs
.default_settings_template:
interruptible: true
# Image templates
.image_template__runtime_build_test_dependencies_template:
image: ${build_deps_image_name}:runtime-build-test-dependencies--${build_deps_image_version}
.image_template__runtime_build_dependencies_template:
image: ${build_deps_image_name}:runtime-build-dependencies--${build_deps_image_version}
.image_template__latest:
image: docker:latest
# Rules template
# Rules for all the jobs that need to be run on development branches (typically
# those that have an MR, but also some experiments, etc.)
.rules_template__development:
rules:
- if: '$TZ_PIPELINE_KIND == "SCHEDULE"'
when: never
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "tezos"'
when: never
- if: '$CI_COMMIT_BRANCH =~ /-release$/ && $CI_PROJECT_NAMESPACE == "tezos"'
when: never
- if: '$CI_COMMIT_TAG != null && $CI_PROJECT_NAMESPACE == "tezos"'
when: never
- when: on_success
# Same as .rules_template__development, but for manual jobs.
.rules_template__development_manual:
rules:
- if: '$TZ_PIPELINE_KIND == "SCHEDULE"'
when: never
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "tezos"'
when: never
- if: '$CI_COMMIT_BRANCH =~ /-release$/ && $CI_PROJECT_NAMESPACE == "tezos"'
when: never
- if: '$CI_COMMIT_TAG != null && $CI_PROJECT_NAMESPACE == "tezos"'
when: never
- when: manual
# Rules for all the jobs that are run only for the master branch and the like
# (tags, releases, etc.)
.rules_template__master_and_releases:
rules:
- if: '$TZ_PIPELINE_KIND == "SCHEDULE"'
when: never
- if: '$CI_COMMIT_TAG && $CI_PROJECT_NAMESPACE == "tezos"'
when: on_success
- if: '$CI_COMMIT_BRANCH =~ /-release$/ && $CI_PROJECT_NAMESPACE == "tezos"'
when: on_success
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "tezos"'
when: on_success
- when: never
# Rules for all the jobs that are run only for the master branch
.rules_template__master:
rules:
- if: '$TZ_PIPELINE_KIND == "SCHEDULE"'
when: never
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "tezos"'
when: on_success
- when: never
# Rules for specific topics: doc, opam, etc.
.rules_template__development_documentation:
rules:
- if: '$TZ_PIPELINE_KIND == "SCHEDULE" && $TZ_SCHEDULE_KIND == "EXTENDED_TESTS"'
when: always
- if: '$CI_COMMIT_TAG && $CI_PROJECT_NAMESPACE == "tezos"'
when: never
- if: '$CI_COMMIT_BRANCH =~ /-release$/ && $CI_PROJECT_NAMESPACE == "tezos"'
when: never
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "tezos"'
when: never
- if: '$CI_COMMIT_BRANCH =~ /doc/'
when: always
- changes:
- /docs
when: always
- when: never
.rules_template__development_opam:
rules:
- if: '$TZ_PIPELINE_KIND == "SCHEDULE" && $TZ_SCHEDULE_KIND == "EXTENDED_TESTS"'
when: always
- if: '$CI_COMMIT_TAG && $CI_PROJECT_NAMESPACE == "tezos"'
when: never
- if: '$CI_COMMIT_BRANCH =~ /-release$/ && $CI_PROJECT_NAMESPACE == "tezos"'
when: never
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "tezos"'
when: always
- if: '$CI_COMMIT_BRANCH =~ /opam/'
when: always
- changes:
- /**/*.opam
- /**/dune
- /**/dune.inc
- /**/*.dune.inc
- /scripts/version.sh
- /.gitlab-ci.yml
when: always
- when: never
.rules_template__development_coverage:
rules:
- if: '$TZ_PIPELINE_KIND == "SCHEDULE" && $TZ_SCHEDULE_KIND == "EXTENDED_TESTS"'
when: always
- when: never
.rules_template__extended_test_pipeline:
rules:
- if: '$TZ_PIPELINE_KIND == "SCHEDULE" && $TZ_SCHEDULE_KIND == "EXTENDED_TESTS"'
when: always
- when: never
# Actual jobs are defined in these included files
include:
- .gitlab/ci/build.yml
- .gitlab/ci/lints.yml
- .gitlab/ci/unittest.yml
- .gitlab/ci/integration.yml
- .gitlab/ci/liquidity-baking-scripts-integrity.yml
- .gitlab/ci/coq.yml
- .gitlab/ci/tezt.yml
- .gitlab/ci/doc.yml
- .gitlab/ci/opam.yml
- .gitlab/ci/publish.yml
- .gitlab/ci/coverage.yml
- .gitlab/ci/test-doc-scripts.yml