blob: 6b8e68652a142d266d01a829936c08c379586e6c (
plain)
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
|
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6-golang-1.11-git-2.21
stages:
- build
- test
- publish
variables:
DOCKER_DRIVER: overlay2
CUSTOM_IMAGE_VERSION: ruby-2.6-golang-1.11-git-2.18
danger-review:
image: registry.gitlab.com/gitlab-org/gitlab-build-images:danger
stage: build
only:
- branches@gitlab-org/gitaly
except:
- tags
- master
script:
- git version
- danger
.ruby_template: &ruby_definition
cache:
key: gems-ruby-2.6
paths:
- ruby/vendor/bundle
.build_template: &build_definition
<<: *ruby_definition
stage: build
script:
- go version
- make
- echo 'make build-gitaly-remote TODO https://gitlab.com/gitlab-org/gitaly/issues/1706'
- _support/test-boot-time .
.assemble_template: &assemble_definition
<<: *ruby_definition
stage: build
only:
- tags
script:
# Just in case we start running CI builds on other architectures in future
- go version
- make binaries
artifacts:
paths:
- _build/assembly/checksums.sha256.txt
- _build/assembly/bin/
name: "$CI_JOB_NAME"
expire_in: 6 months
.go_test_template: &go_test_definition
<<: *ruby_definition
stage: test
# Override the ruby_definition cache definition for pull
cache:
key: gems-ruby-2.6
paths:
- ruby/vendor/bundle
policy: pull
artifacts:
paths:
- ruby/tmp/gitaly-rspec-test.log
when: on_failure
expire_in: 1 week
.test_template: &test_definition
<<: *go_test_definition
script:
- go version
- git version
- make test
- echo 'make test-gitaly-remote TODO https://gitlab.com/gitlab-org/gitaly/issues/1706'
verify:
<<: *ruby_definition
stage: test
script:
- make verify
verify-warnings:
<<: *ruby_definition
stage: test
script:
- make verify-warnings
allow_failure: true
proto:
<<: *ruby_definition
stage: test
script:
- make proto no-changes
build:go1.12:
<<: *build_definition
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6-golang-1.12-git-2.21
build:go1.11:
<<: *build_definition
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6-golang-1.11-git-2.21
binaries_go1.12:
<<: *assemble_definition
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6-golang-1.12-git-2.21
binaries_go1.11:
<<: *assemble_definition
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6-golang-1.11-git-2.21
test:go1.12-git-2.22-ruby-2.6:
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6-golang-1.12-git-2.22
<<: *test_definition
test:go1.12-git-2.21-ruby-2.6:
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6-golang-1.12-git-2.21
<<: *test_definition
test:go1.11-git-2.21-ruby-2.6:
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6-golang-1.11-git-2.21
<<: *test_definition
test:proxy:
<<: *test_definition
script:
- make test-with-proxies
race:
<<: *go_test_definition
script:
- go version
- git version
- make race-go
cover:
<<: *ruby_definition
stage: test
script:
- make cover
.build_image: &build_image
stage: publish
image: docker:latest
services:
- docker:dind
docker:
<<: *build_image
script:
- mkdir -p _support/build-images/$CI_JOB_NAME/
- cp ruby/Gemfile ruby/Gemfile.lock _support/build-images/$CI_JOB_NAME/
- cp _support/build-images/versioned/Dockerfile _support/build-images/$CI_JOB_NAME/
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE/gitaly:latest --build-arg CUSTOM_IMAGE_VERSION=$CUSTOM_IMAGE_VERSION _support/build-images/$CI_JOB_NAME
- docker push $CI_REGISTRY_IMAGE/gitaly:latest
only:
- master
docker-tag:
<<: *build_image
script:
- mkdir -p _support/build-images/$CI_JOB_NAME/
- cp ruby/Gemfile ruby/Gemfile.lock _support/build-images/$CI_JOB_NAME/
- cp _support/build-images/versioned/Dockerfile _support/build-images/$CI_JOB_NAME/
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE/gitaly:$CI_COMMIT_TAG --build-arg CUSTOM_IMAGE_VERSION=$CUSTOM_IMAGE_VERSION _support/build-images/$CI_JOB_NAME
- docker push $CI_REGISTRY_IMAGE/gitaly:$CI_COMMIT_TAG
only:
- tags@gitlab-org/gitaly
# Create a MR in GitLab-CE when releasing a Gitaly version
update-downstream-server-version:
stage: publish
only:
- tags@gitlab-org/gitaly
script:
- ruby _support/update-downstream-server-version
allow_failure: true
include:
template: Security/License-Management.gitlab-ci.yml
|