forked from mysteriumnetwork/node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
230 lines (192 loc) · 4.87 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
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
stages:
- prepare
- test
- pre-release
- build
- release-snapshot
- release-tag
- post-release
variables:
BUILD_COMMIT: $CI_COMMIT_SHORT_SHA
BUILD_BRANCH: $CI_COMMIT_REF_NAME
BUILD_BRANCH_SAFE: $CI_COMMIT_REF_SLUG
BUILD_TAG: $CI_COMMIT_TAG
BUILD_NUMBER: $CI_PIPELINE_ID
GITHUB_OWNER: mysteriumnetwork
GITHUB_REPO: node
GITHUB_SNAPSHOT_REPO: node-builds
GO_PACKAGE: github.com/mysteriumnetwork/node
GIT_CLONE_PATH: /home/gitlab-runner/go/src/$GO_PACKAGE
GOFLAGS: "-count=1" # Supersedes GOCACHE=off, see: https://github.com/golang/go/issues/29378#issuecomment-449383809
before_script:
# load vars generated by prepare:env
- source build/env.sh
- echo "${DOCKERHUB_PASSWORD}" | docker login --username "${DOCKERHUB_USERNAME}" --password-stdin || true
after_script:
# docker based jobs leave files owned by root
- sudo chown -R gitlab-runner:gitlab-runner $GOPATH
env:
stage: prepare
tags: [go]
artifacts:
paths: [build/env.sh]
before_script:
- ''
script: go run mage.go -v GenerateEnvFile
checks:
stage: test
tags: [go]
retry: 2
script:
- go run mage.go -v Check
test:
stage: test
tags: [go]
retry: 2
script:
- go run mage.go -v TestWithCoverage
- touch $CI_PROJECT_DIR/success
after_script:
- |
if [ -e success ]; then
bash <(curl -s https://codecov.io/bash)
fi
test-e2e-basic:
stage: test
tags: [go,high_performance]
retry: 2
script: go run mage.go -v TestE2EBasic
test-e2e-nat:
stage: test
tags: [go,high_performance]
retry: 2
script: go run mage.go -v TestE2ENAT
# with the new payments, we're making a breaking change, so no compatibility for now
# test-e2e-compatibility:
# stage: test
# tags: [go,high_performance]
# script: go run mage.go -v TestE2ECompatibility
#test-install-script:
# stage: test
# tags: [go,dedicated]
# script: go run mage.go -v TestInstallScript
# only:
# - master
create-bucket:
stage: pre-release
tags: [go]
script: go run mage.go -v MakeBucket
package:linux-amd64:
stage: build
tags: [go]
script: go run mage.go -v PackageLinuxAmd64
package:linux-arm:
stage: build
tags: [go]
script: go run mage.go -v PackageLinuxArm
package:linux-debian-amd64:
stage: build
tags: [go]
script: go run mage.go -v PackageLinuxDebianAmd64
package:linux-debian-arm:
stage: build
tags: [go]
script: go run mage.go -v PackageLinuxDebianArm
package:linux-debian-arm64:
stage: build
tags: [go]
script: go run mage.go -v PackageLinuxDebianArm64
package:linux-raspberry-image:
stage: build
tags: [go,high_performance]
script: go run mage.go -v PackageLinuxRaspberryImage
package:macos-amd64:
stage: build
tags: [go]
script: go run mage.go -v PackageMacOSAmd64
package:macos-arm64:
stage: build
tags: [go]
script: go run mage.go -v PackageMacOSArm64
package:windows-amd64:
stage: build
tags: [go]
script: go run mage.go -v PackageWindowsAmd64
package:android:
stage: build
tags: [go]
script: go run mage.go -v PackageAndroid
package:android-provider:
stage: build
tags: [go]
script: go run mage.go -v PackageAndroidProvider
package:swagger-redoc-docker:
stage: build
tags: [go]
script: go run mage.go -v PackageDockerSwaggerRedoc
release-snapshot:release:
stage: release-snapshot
tags: [go]
script: go run mage.go -v ReleaseGithubSnapshot
release-snapshot:docker:
stage: release-snapshot
tags: [go]
script: go run mage.go -v ReleaseDockerSnapshot
release-snapshot:debian-ppa:
stage: release-snapshot
tags: [go]
retry: 2
script: go run mage.go -v ReleaseDebianPPASnapshot
only:
- master
release-snapshot:goreport:
stage: release-snapshot
tags: [go]
retry: 2
script: bin/release_goreport
only:
- master
release-nightly:node:
stage: release-snapshot
tags: [go]
script: go run mage.go -v ReleaseGithubNightly
only:
- master
release-tag:release:
stage: release-tag
tags: [go]
script: go run mage.go -v ReleaseGithubTag
release-tag:docker:
stage: release-tag
tags: [go,high_performance]
script: go run mage.go -v ReleaseDockerTag
release-tag:debian-ppa:
stage: release-tag
tags: [go]
script: go run mage.go -v ReleaseDebianPPAPreRelease
release-tag:android-sdk:
stage: release-tag
tags: [go]
script: go run mage.go -v ReleaseAndroidSDK
release-tag:android-provider-sdk:
stage: release-tag
tags: [go]
script: go run mage.go -v ReleaseAndroidProviderSDK
remove-bucket:
stage: post-release
tags: [go]
script: go run mage.go -v RemoveBucket
notify-uptimerobot:
stage: post-release
tags: [go]
script:
- |
if [ "$NIGHTLY_BUILD" = "1" -o "$NIGHTLY_BUILD" = "T" -o "$NIGHTLY_BUILD" = "true" -o "$NIGHTLY_BUILD" = "True" -o "$NIGHTLY_BUILD" = "TRUE" ]; then
curl -so /dev/null -I "$NIGHTLY_UPTIMEROBOT"
fi
only:
- master
pr-avado:
stage: post-release
tags: [go]
script: go run mage.go -v CreateAvadoPR