forked from steemit/steem
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
638 lines (588 loc) · 21.7 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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
stages:
- build-env
- build
- docker
- test
- devices
- staging
- production
- deploy
condenser-docker-test:
needs: []
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker buildx build --file ui/condenser/Dockerfile --cache-from $CI_REGISTRY_IMAGE/condenser:cache --cache-to $CI_REGISTRY_IMAGE/condenser:cache --platform linux/amd64 ./ui/condenser
tags:
- shell-arch
except:
- dev
condenser-docker-test-arm:
needs: []
stage: build
script:
- docker image prune -f
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker buildx build --file ui/condenser/Dockerfile --cache-from $CI_REGISTRY_IMAGE/condenser-arm64:cache --cache-to $CI_REGISTRY_IMAGE/condenser-arm64:cache --platform linux/arm64 ./ui/condenser
tags:
- arm64-shell
except:
- dev
condenser-docker-push:
needs: []
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker buildx build --file ui/condenser/Dockerfile --tag $CI_REGISTRY_IMAGE/condenser:$CI_COMMIT_BRANCH --cache-from $CI_REGISTRY_IMAGE/condenser:cache --cache-to $CI_REGISTRY_IMAGE/condenser:cache --push --platform linux/amd64 ./ui/condenser
tags:
- shell-arch
only:
- dev
condenser-docker-push-arm:
needs: []
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker buildx build --file ui/condenser/Dockerfile --tag $CI_REGISTRY_IMAGE/condenser-arm64:$CI_COMMIT_BRANCH --cache-from $CI_REGISTRY_IMAGE/condenser-arm64:cache --cache-to $CI_REGISTRY_IMAGE/condenser-arm64:cache --push --platform linux/arm64 ./ui/condenser
tags:
- arm64-shell
only:
- dev
# This happens at each commit to "dev", so we don't need to pull when going to production, though we may want to consider a tagging system or something.
# For now, let the build ruh, check staging.blurt.world and then if it looks OK, use the others.
condenser-staging:
needs:
- condenser-docker-push
stage: staging
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $CI_REGISTRY_IMAGE/condenser:$CI_COMMIT_BRANCH
- docker stop staging || true
- docker rm staging || true
- docker run -d --name staging --env NODE_ENV=production -p 6969:6969 --env PORT=6969 --env SDC_SITE_DOMAIN=staging.blurt.world --env SDC_SESSION_SECRETKEY="$SDC_SESSION_SECRETKEY" $CI_REGISTRY_IMAGE/condenser:$CI_COMMIT_BRANCH
tags:
- shell-arch
only:
- dev
condenser-production-world:
needs:
- condenser-docker-push
when: manual
stage: production
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker stop world || true
- docker rm world || true
- docker run -d --name world --env NODE_ENV=production -p 69:69 --env PORT=69 --env SDC_SITE_DOMAIN=blurt.world --env SDC_UPLOAD_IMAGE_URL=https://blurt.world/imagesup/ --env SDC_IMAGE_PROXY_PREFIX=https://blurt.world/imagesup/ --env SDC_SESSION_SECRETKEY="$SDC_SESSION_SECRETKEY" $CI_REGISTRY_IMAGE/condenser:$CI_COMMIT_BRANCH
tags:
- shell-arch
only:
- dev
condenser-staging-latam:
needs:
- condenser-docker-push
stage: staging
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker stop world || true
- docker rm world || true
- docker run -d --name world --env NODE_ENV=production -p 69:69 --env PORT=69 --env SDC_SITE_DOMAIN=staging.blurtlatam.com --env SDC_SESSION_SECRETKEY="$SDC_SESSION_SECRETKEY" $CI_REGISTRY_IMAGE/condenser:$CI_COMMIT_BRANCH
tags:
- blurtlatam
only:
- dev
condenser-production-latam:
needs:
- condenser-docker-push
when: manual
stage: production
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker stop world || true
- docker rm world || true
- docker run -d --name world --env NODE_ENV=production -p 69:6969 --env PORT=6969 --env SDC_SITE_DOMAIN=blurtlatam.com --env SDC_UPLOAD_IMAGE_URL=https://blurt.blog/imagesup --env SDC_SESSION_SECRETKEY="$SDC_SESSION_SECRETKEY" $CI_REGISTRY_IMAGE/condenser:$CI_COMMIT_BRANCH
tags:
- blurtlatam
only:
- dev
# Caddy can be automated so that people who buy servers will only need to click to deploy.
#caddy-latam:
# when: manual
# stage: production
# script:
# - docker run -d --name caddy caddy caddy reverse-proxy --from :2016 --to 127.0.0.1:9000
condenser-production-blog:
needs:
- condenser-docker-push
when: manual
stage: production
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker stop blog || true
- docker rm blog || true
- docker run -d --name blog --env NODE_ENV=production -p 569:569 --env PORT=569 --env SDC_SITE_DOMAIN=blurt.blog --env SDC_UPLOAD_IMAGE_URL=https://blurt.blog/imagesup --env SDC_IMAGE_PROXY_PREFIX=https://blurt.world/imagesup --env SDC_SESSION_SECRETKEY="$SDC_SESSION_SECRETKEY" $CI_REGISTRY_IMAGE/condenser:$CI_COMMIT_BRANCH
tags:
- shell-arch
only:
- dev
imgp test build:
needs: []
stage: build
script:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull --platform linux/arm64 faddat/archlinux
- docker pull --platform linux/amd64 faddat/archlinux
- docker buildx build --file storage/imgp/Dockerfile --platform linux/arm64,linux/amd64 ./storage/imgp
tags:
- amd64-shell
except:
- dev
imgp container push:
needs: []
stage: build
script:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull --platform linux/arm64 faddat/archlinux
- docker pull --platform linux/amd64 faddat/archlinux
- docker buildx build --file storage/imgp/Dockerfile --tag $CI_REGISTRY_IMAGE/imgp:$CI_COMMIT_BRANCH --push --platform linux/arm64,linux/amd64 ./storage/imgp
tags:
- amd64-shell
only:
- dev
imageupload test build:
needs: []
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
- docker pull --platform linux/arm64 faddat/archlinux
- docker pull --platform linux/amd64 faddat/archlinux
- docker buildx build --file storage/imageupload/Dockerfile --platform linux/arm64,linux/amd64 ./storage/imageupload
tags:
- amd64-shell
except:
- dev
imagehoster test:
needs: []
stage: build
script:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull --platform linux/arm64 faddat/archlinux
- docker pull --platform linux/amd64 faddat/archlinux
- docker buildx build --file storage/imagehoster/Dockerfile --platform linux/amd64 ./storage/imagehoster
tags:
- amd64-shell
except:
- dev
imagehoster push:
needs: []
stage: build
script:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull --platform linux/arm64 faddat/archlinux
- docker pull --platform linux/amd64 faddat/archlinux
- docker buildx build --file storage/imagehoster/Dockerfile --tag $CI_REGISTRY_IMAGE/imagehoster:$CI_COMMIT_BRANCH --push --platform linux/amd64 ./storage/imagehoster
tags:
- amd64-shell
only:
- dev
imageupload container push:
needs: []
stage: build
script:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull --platform linux/arm64 faddat/archlinux
- docker pull --platform linux/amd64 faddat/archlinux
- docker buildx build --file storage/imageupload/Dockerfile --tag $CI_REGISTRY_IMAGE/imageupload:$CI_COMMIT_BRANCH --push --platform linux/arm64,linux/amd64 ./storage/imageupload
tags:
- amd64-shell
only:
- dev
# Instablurt jobs will kill instances of themselves running previously. This is alright.
# instablurt-amd64:
# needs: []
# stage: docker
# script:
# - docker stop instablurt-amd64 || true
# - docker rm instablurt-amd64 || true
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# - docker run -d --name instablurt-amd64 $CI_REGISTRY_IMAGE/witness:dev
# - for i in {1..1000}; do echo -n "This is a test in loop $i $(docker logs -n 5 instablurt-amd64) "; date ; sleep 5; done
# - docker commit instablurt-amd64
# - docker tag instablurt-amd64 $CI_REGISTRY_IMAGE/instablurt-amd64:$CI_COMMIT_BRANCH
# - docker push $CI_REGISTRY_IMAGE/instablurt-amd64:$CI_COMMIT_BRANCH
# - docker stop instablurt-amd64
# - docker rm instablurt-amd64
# tags:
# - amd64-shell
#instablurt-arm64:
# needs: []
# stage: docker
# script:
# - docker stop instablurt-arm64 || true
# - docker rm instablurt-arm64 || true
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# - docker run -d --net=host --restart=unless-stopped --name instablurt-arm64 faddat/arm-blurt-presync /usr/bin/blurtd --data-dir /blurtd
# - for i in {1..1000}; do echo -n "This is a test in loop $i $(docker logs -n 5 instablurt-arm64) "; date ; sleep 5; done
# - docker commit instablurt-arm64
# - docker tag instablurt-arm64 $CI_REGISTRY_IMAGE/instablurt-arm64:$CI_COMMIT_BRANCH
# - docker push $CI_REGISTRY_IMAGE/instablurt-arm64:$CI_COMMIT_BRANCH
# - docker stop instablurt-arm64
# - docker rm instablurt-arm64
# tags:
# - arm64-shell
# Hard Fork 3
testnet:
stage: build
variables:
CC: "clang"
CXX: "clang++"
needs: []
script:
- mkdir build
- cd build
- cmake -DBLURT_STATIC_BUILD=ON -DLOW_MEMORY_NODE=OFF -DCLEAR_VOTES=OFF -WINT_IN_BOOL_CONTEXT=OFF -DBUILD_BLURT_TESTNET=ON -DSKIP_BY_TX_ID=ON -DBLURT_LINT_LEVEL=FULL -DENABLE_MIRA=OFF -DCMAKE_BUILD_TYPE=Release ..
- make -j$(nproc) blurtd cli_wallet
tags:
- shell-arch
artifacts:
paths:
- build/programs/blurtd/blurtd
- blild/programs/cli_wallet/cli_wallet
sonarcloud:
stage: test
tags:
- shell-arch
needs: []
variables:
CC: "clang"
CXX: "clang++"
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
script:
# Download build-wrapper
- curl "${SONAR_HOST_URL}/static/cpp/build-wrapper-linux-x86.zip" --output build-wrapper-linux-x86.zip
- unzip build-wrapper-linux-x86.zip
# workaround to the bw haswell bug
- cp build-wrapper-linux-x86/libinterceptor-x86_64.so build-wrapper-linux-x86/libinterceptor-haswell.so
# get sonar-scanner
- curl 'https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.2.0.1873-linux.zip' --output sonar-scanner-cli-4.2.0.1873-linux.zip
- unzip sonar-scanner-cli-4.2.0.1873-linux.zip
- mv sonar-scanner-4.2.0.1873-linux sonar-scanner
# Configure and compile blurt
- mkdir build
- cd build
- cmake -DBLURT_STATIC_BUILD=ON -DLOW_MEMORY_NODE=ON -DCLEAR_VOTES=ON -WINT_IN_BOOL_CONTEXT=OFF -DBUILD_BLURT_TESTNET=OFF -DSKIP_BY_TX_ID=ON -DBLURT_LINT_LEVEL=OFF -DENABLE_MIRA=ON -DCMAKE_BUILD_TYPE=Release ..
- cd ..
# run the build inside the build wrapper
- build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir . cmake --build build/ --config Release --parallel --target blurtd cli_wallet
- sonar-scanner/bin/sonar-scanner -X -Dsonar.host.url="${SONAR_HOST_URL}" -Dsonar.token="${SONAR_TOKEN}"
artifacts:
paths:
- /builds/blurt/blurt/build/bin/
only:
- merge_requests
- master
- dev
# DISABLED BECAUSE OF ISSUES WITH LOPSIDED/ARCHLINUX
# Specifically, an archlinux-keyring issue
megadrive-build-env:
stage: build-env
when: manual
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker buildx build --file contrib/Dockerfiles/builder/Dockerfile --tag $CI_REGISTRY_IMAGE/md-env --push --platform linux/arm64,linux/amd64 .
tags:
- amd64-shell
# Builds blurt arm64-ified
megadrive-build-ubuntu:
stage: build
script:
- docker image prune -f
- mkdir build
- cd build
- cmake -DBLURT_STATIC_BUILD=ON -DLOW_MEMORY_NODE=ON -DCLEAR_VOTES=ON -WINT_IN_BOOL_CONTEXT=OFF -DBUILD_BLURT_TESTNET=OFF -DSKIP_BY_TX_ID=ON -DBLURT_LINT_LEVEL=FULL -DENABLE_MIRA=OFF -DCMAKE_BUILD_TYPE=Release ..
- make -j$(nproc) blurtd cli_wallet
tags:
- arm64-shell
artifacts:
paths:
- build/programs/blurtd/blurtd
- blild/programs/cli_wallet/cli_wallet
# Builds blurt arm64 testnet
megadrive-testnet-ubuntu:
stage: build
script:
- mkdir build
- cd build
- cmake -DBLURT_STATIC_BUILD=ON -DLOW_MEMORY_NODE=ON -DCLEAR_VOTES=ON -WINT_IN_BOOL_CONTEXT=OFF -DBUILD_BLURT_TESTNET=ON -DSKIP_BY_TX_ID=ON -DBLURT_LINT_LEVEL=FULL -DENABLE_MIRA=OFF -DCMAKE_BUILD_TYPE=Release ..
- make -j$(nproc) blurtd cli_wallet
tags:
- arm64-shell
artifacts:
paths:
- build/programs/blurtd/blurtd
- blild/programs/cli_wallet/cli_wallet
# construct the light cryptopie device image. runs blurt on sos-lite as a container.
raspberrypi4:
when: manual
needs: []
stage: devices
script:
- bash contrib/cryptopie/build.sh
- xz -T $(nproc) images/cryptopie.img
- export STAMP=$(date "+%F-%T")
- mv images/cryptopie.img.xz /static/cryptopie/cryptopie-$(echo $STAMP).img.xz
- sudo ipfs add -Q /static/cryptopie/cryptopie-$(echo $STAMP).img.xz > /static/cryptopie/cryptopie-$(echo $STAMP).html
tags:
- shell-arch
# construct the light odroid-c2 device image. runs blurt on sos-lite as a container.
oroid-c2:
when: manual
needs: []
stage: devices
script:
- bash contrib/c2/build.sh
- xz -T $(nproc) images/megadrive-light.img
- export STAMP=$(date "+%F-%T")
- mv images/megadrive-light.img.xz /static/c2-light/c2-light-$(echo $STAMP).img.xz
- sudo ipfs add -Q /static/c2-light/c2-light-$(echo $STAMP).img.xz > /static/c2-light/c2-light-$(echo $STAMP).html
tags:
- shell-arch
# Release new versions of blurtjs
blurtjs:
image: node:latest
needs: []
stage: deploy
when: manual
variables:
NPM_TOKEN: ${CI_JOB_TOKEN}
script:
- npm ci --cache .npm --prefer-offline
- |
{
echo "@${CI_PROJECT_ROOT_NAMESPACE}:registry=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/"
echo "${CI_API_V4_URL#https?}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
} | tee --append .npmrc
- cd client-libs/blurtjs
- yarn install
- yarn build
- npm adduser
- npm run semantic-release
# Release changes to dblurt
dblurt:
image: node:latest
needs: []
stage: deploy
when: manual
variables:
NPM_TOKEN: ${CI_JOB_TOKEN}
script:
- npm ci --cache .npm --prefer-offline
- |
{
echo "@${CI_PROJECT_ROOT_NAMESPACE}:registry=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/"
echo "${CI_API_V4_URL#https?}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
} | tee --append .npmrc
- cd client-libs/dblurt
- yarn install
- npm adduser
- npm run semantic-release
# construct the megadrive arch container
megadrive-container:
needs:
- megadrive-build-ubuntu
stage: docker
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker buildx build --file contrib/Dockerfiles/ci/Dockerfile --platform linux/arm64 --tag $CI_REGISTRY_IMAGE/megadrive:$CI_COMMIT_BRANCH --push --progress plain .
tags:
- amd64-shell
dependencies:
- megadrive-build-ubuntu
# construct the megadrive arch container
megadrive-testnet-container:
needs:
- megadrive-testnet-ubuntu
stage: docker
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker buildx build --file contrib/Dockerfiles/ci/Dockerfile --platform linux/arm64 --tag $CI_REGISTRY_IMAGE/megadrive-testnet:$CI_COMMIT_BRANCH --push --progress plain .
tags:
- amd64-shell
dependencies:
- megadrive-testnet-ubuntu
witness:
stage: build
variables:
CC: "clang"
CXX: "clang++"
script:
- mkdir build
- cd build
# Witness Build Config: -DLOW_MEMORY_NODE=ON -DCLEAR_VOTES=ON
- cmake -DBLURT_STATIC_BUILD=ON -DLOW_MEMORY_NODE=ON -DCLEAR_VOTES=ON -WINT_IN_BOOL_CONTEXT=OFF -DBUILD_BLURT_TESTNET=OFF -DSKIP_BY_TX_ID=ON -DBLURT_LINT_LEVEL=OFF -DENABLE_MIRA=OFF -DCMAKE_BUILD_TYPE=Release ..
- make -j$(nproc) blurtd cli_wallet
# cli wallet is only used for witness, so we capture it from the witness build
tags:
- shell-arch
artifacts:
paths:
- build/programs/blurtd/blurtd
- blild/programs/cli_wallet/cli_wallet
needs: []
witness test- is replay needed?:
stage: test
when: manual
script:
- ./build/bin/blurtd
needs:
- witness
dependencies:
- witness
tags:
- shell-arch
witness from scratch in docker:
stage: test
when: manual
image: $CI_REGISTRY_IMAGE/witness:$CI_COMMIT_BRANCH
script:
- blurtd --data-dir /blurtd
needs:
- kaniko witness
rpc from scratch in docker:
stage: test
when: manual
image: $CI_REGISTRY_IMAGE/rpc:$CI_COMMIT_BRANCH
script:
- blurtd --data-dir /blurtd
needs:
- kaniko rpc
mira from scratch in docker:
stage: test
when: manual
image: $CI_REGISTRY_IMAGE/mira:$CI_COMMIT_BRANCH
script:
- blurtd --data-dir /blurtd
needs:
- kaniko mira
mira:
stage: build
variables:
CC: "clang"
CXX: "clang++"
script:
- mkdir build
- cd build
- cmake -DBLURT_STATIC_BUILD=ON -DLOW_MEMORY_NODE=ON -DCLEAR_VOTES=ON -WINT_IN_BOOL_CONTEXT=OFF -DBUILD_BLURT_TESTNET=OFF -DSKIP_BY_TX_ID=ON -DBLURT_LINT_LEVEL=OFF -DENABLE_MIRA=ON -DCMAKE_BUILD_TYPE=Release ..
- make -j$(nproc) blurtd cli_wallet
tags:
- shell-arch
artifacts:
paths:
- build/programs/blurtd/blurtd
- build/programs/cli_wallet/cli_wallet
needs: []
rpc:
stage: build
variables:
CC: "clang"
CXX: "clang++"
script:
- mkdir build
- cd build
- cmake -DBLURT_STATIC_BUILD=ON -DLOW_MEMORY_NODE=OFF -DCLEAR_VOTES=OFF -WINT_IN_BOOL_CONTEXT=OFF -DBUILD_BLURT_TESTNET=OFF -DSKIP_BY_TX_ID=OFF -DBLURT_LINT_LEVEL=OFF -DENABLE_MIRA=OFF -DCMAKE_BUILD_TYPE=Release ..
- make -j$(nproc) blurtd cli_wallet
tags:
- shell-arch
artifacts:
paths:
- build/programs/blurtd/blurtd
- blild/programs/cli_wallet/cli_wallet
needs: []
kaniko witness:
stage: docker
needs:
- witness
dependencies:
- witness
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/contrib/Dockerfiles/ci/Dockerfile --destination $CI_REGISTRY_IMAGE/witness:$CI_COMMIT_BRANCH
tags:
- metal
kaniko rpc:
stage: docker
needs:
- rpc
dependencies:
- rpc
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/contrib/Dockerfiles/rpc/Dockerfile --destination $CI_REGISTRY_IMAGE/rpc:$CI_COMMIT_BRANCH
tags:
- metal
# this cazy thing here will interrupt prior jobs. It's kinda sorta okay.
# LETS MAKE A PRESYNC IMAGE AT OTHER TIMES.
# rpc presync:
# stage: docker
# needs:
# - rpc
# dependencies:
# - rpc
# script:
# - docker stop rpc-presync || true
# - docker rm rpc-presync || true
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# - docker buildx build --dockerfile $CI_PROJECT_DIR/contrib/Dockerfiles/rpc-presync/Dockerfile --tag $CI_REGISTRY_IMAGE/rpc-presync:$CI_COMMIT_BRANCH .
# - docker run -d $CI_REGISTRY_IMAGE/rpc-presync:$CI_COMMIT_BRANCH --name rpc-presync
# - for i in {1..1000}; do echo -n "This is a test in loop $i $(docker logs -n 5 rpc-presync) "; date ; sleep 5; done
# - docker commit $CI_REGISTRY_IMAGE/rpc-presync:$CI_COMMIT_BRANCH
# - docker stop rpc-presync
# - docker rm rpc-presync
# tags:
# - metal
kaniko testnet:
stage: docker
needs:
- testnet
dependencies:
- testnet
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/contrib/Dockerfiles/rpc/Dockerfile --destination $CI_REGISTRY_IMAGE/testnet:$CI_COMMIT_BRANCH
tags:
- metal
kaniko mira:
stage: docker
needs:
- mira
dependencies:
- mira
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/contrib/Dockerfiles/ci/Dockerfile --destination $CI_REGISTRY_IMAGE/mira:$CI_COMMIT_BRANCH
tags:
- metal
include:
- template: Security/Dependency-Scanning.gitlab-ci.yml
- template: Security/License-Scanning.gitlab-ci.yml
- template: Security/SAST.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml