-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
893 lines (825 loc) · 27.3 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
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
---
stages:
- check
- dockerbuild-pre
- dockerbuild
- build-pre
- build
- test
- package
- publish
- tag
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- cache/
variables:
staticLibVersion: '20190607'
rustVersion: '1.51.0'
libsovtokenVersion: '1.0.5'
vdrtoolsBranch: 'rc' # RPM stream
# indySimpleVersion: '1.16.0' # RPM package name
# indyFullRpmVersion: '1.16.0-170' # RPM directory
vdrtoolsFullDebVersion: '0.8.6' # DEB package name
msdkVersion: '2.1.3' # CHANGE_ME for every VCX stable release (0.14.1 VCX)
vcxVersion: '0.14.1'
## - Anchors - ##
.tags_micro:
tags:
- docker-machine
- micro
.tags_large:
tags:
- docker-machine
- large
.kaniko_large:
extends: .kaniko_micro
tags:
- docker-machine
- large
.kaniko_micro:
extends: .tags_micro
image:
name: gcr.io/kaniko-project/executor:debug-v0.16.0
entrypoint: ['']
script:
- if [ "$CI_COMMIT_REF_SLUG" == 'main' ] || [ "$CI_COMMIT_REF_SLUG" == 'stable' ]; then KANIKO_ARGS="--destination $CI_REGISTRY_IMAGE/${DOCKER_IMAGE_NAME}:latest $KANIKO_ARGS"; fi
- echo "${KANIKO_ARGS}"
- |
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" \
> /kaniko/.docker/config.json
- |
echo "-----BEGIN CERTIFICATE-----
MIIFJTCCAw2gAwIBAgIUMI0Z8YSLeRq8pZks40O3Dq2m8TIwDQYJKoZIhvcNAQEL
BQAwGjEYMBYGA1UEAxMPRXZlcm55bSBSb290IENBMB4XDTE3MTAxMTIwMTAxMFoX
DTQ3MTAwNDIwMTAzOVowGjEYMBYGA1UEAxMPRXZlcm55bSBSb290IENBMIICIjAN
BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA1kjmtmMfLJfsqUNaco44N3brW8Vu
b02lAeEwbxc65mwfAG8kAjW7kYhI/fDXFOYXUvoa3Dg7bFeEatdIjHOahZssGM27
HsQZ4PfRhPE6HtXFszmDwXWuEekVxoyueTqL7ExnNZ+BRTXvPfm5nw1E7L3o3xHF
GSOtWFCyHfKd1LwMKzAVSjxlawEZnfk3WK3NxrC4UYMlQaDme7m3rCMfO+KBQk69
bFXsgn6/EihVeQ8T1+T8gogofzh5b4Z7kS6e6GMqotbGFg4agejkRVsIglSpaQLk
2Ztn/MP1dwgyvO4uvplB4sxZSC2FhhovlwPETmbKsnpj020+m0+YU4FPKwjroMiH
tP//YqiNKsLxtjhffW7XFToyy0qQttW5RMWnyx4MXs9Hwcy29gY1izeGMSzz3zV5
HG8JSJikuYbYiGJRVS0egovkVjja6lrVk0Q4Hm5pbw4l7LYCd6bkDLMsRaS1QnWs
9iz6XEf5SpIu1FuqHmlhj1ABehUyGIg5oC6egML3q78yk0mCW523qMFa9Kjnk871
mmXSCn3p/3DCrwWYfpcibxtVaKyJj6ISYIcl+Zu65Uzmhf+nj56x3gkNgEOva7JS
Xge+FxPxsaXBGyeSH09nNIoNmh/UucuzpNY2UyCpJuqXHtR5jaACSdsqNxG8tcDg
K9v98D/DFiShghECAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
MAMBAf8wHQYDVR0OBBYEFOrH4oUpB94gNDNqdGG92kdVZ3qkMB8GA1UdIwQYMBaA
FOrH4oUpB94gNDNqdGG92kdVZ3qkMA0GCSqGSIb3DQEBCwUAA4ICAQCwjN3ggZ98
BXT39fKkCX3FHb0++aFcIyMKWrcZIpYrl3GoZsNKZK4QNQ+uJOP8xmqgyrCoMfch
VIGPQ0RDN/IzqCLhc/U3pDmk2hXa3xTxD3gpCQZ6Bz04KlcLfZd5jzbI741bVDyF
a1n46bEyuqV4SsNJWI/FGokJCNcZH66njBQBaQAccZ7xB9vWU9yjIYtGQDDvSm6J
SC2knrQri0vv4QLUSc1LS6AlWWSQxcCpcdO+OzIFGsf5bVmYN6J4R3COY5NyQ+yn
pOSN2NOh5h3ZrYAxm3i4Il0orVLveVcTVDGeAgZUII4YLJi/01RHGqit3aCuApSh
bzFTZ5FldFss+JX9iAhqpFDbHLgae0F3QmYEnGilt/PzO4j23QJo3FZKeruQLH7P
L9aOgN6S2+Akbbm9YTc59yzU5TZMxANwTdaYFWFqk/8nKgZiBR1l8jnWTlWnm86A
qVssH3DLKwiYrWSOHRzGuN5BmPXxxtKQJlwAXt0wJE3puUkaJSRo7CJQ3QNMoKDe
OjzXc9WvkFIXr3Eui8UTiHB/WT7N4o8hmVN404akGfWE0YNwRVfWpjGdew6g0tZi
lFnjUUk49av67um43JHcinT5NFPuleZzkjaL/D8ueOrjXQDy05rwVdgmw9pXog4B
Tw6APXtEnjfD2H8HOpOX/7ef4gWK0O1Q7A==
-----END CERTIFICATE-----" >> /kaniko/ssl/certs/ca-certificates.crt
- |
/kaniko/executor ${KANIKO_ARGS} --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/${DOCKERFILE_PATH} \
--destination $CI_REGISTRY_IMAGE/${DOCKER_IMAGE_NAME}:${CI_COMMIT_REF_SLUG}
## - Jobs : dockerbuild-pre - ##
license-data-check:
stage: check
image: registry.gitlab.com/evernym/containers/ssh-git:latest
script: ./ci/license-date-check.sh
tags:
- docker-machine
# - Jobs : dockerbuild-pre - ##
.dockerbuild-vcx-libindy:
extends: .kaniko_large
variables:
KANIKO_ARGS: '--build-arg RUST_VER=${rustVersion} --build-arg LIBVDRTOOLS_VER=${vdrtoolsFullDebVersion}'
only:
refs:
- main
- stable
- cheqd
- cheqddebug
- /^docker-.*/
dockerbuild-vcx-libindy-ubuntu20:
stage: dockerbuild-pre
extends: .dockerbuild-vcx-libindy
variables:
DOCKERFILE_PATH: ci/libindy-ubuntu20.dockerfile
DOCKER_IMAGE_NAME: vcx-libindy-ubuntu20
only:
changes:
- .gitlab-ci.yml
- ci/libindy-ubuntu20.dockerfile
dockerbuild-vcx-libindy-ubuntu18:
stage: dockerbuild-pre
extends: .dockerbuild-vcx-libindy
variables:
DOCKERFILE_PATH: ci/libindy-ubuntu18.dockerfile
DOCKER_IMAGE_NAME: vcx-libindy-ubuntu18
only:
changes:
- .gitlab-ci.yml
- ci/libindy-ubuntu18.dockerfile
#dockerbuild-vcx-libindy-centos:
# stage: dockerbuild-pre
# extends: .kaniko_micro
# variables:
# DOCKERFILE_PATH: ci/libindy-centos.dockerfile
# DOCKER_IMAGE_NAME: vcx-libindy-centos
# KANIKO_ARGS: '--build-arg LIBINDY_VER=${indyFullRpmVersion} --build-arg LIBINDY_SIMPLE_VER=${indySimpleVersion} --build-arg LIBINDY_BRANCH=${indyBranch} --build-arg RUST_VER=${rustVersion}'
# only:
# refs:
# - main
# - cheqd
# - cheqddebug
# - stable
# - /^docker-.*/
# changes:
# - .gitlab-ci.yml
# - ci/libindy-centos.dockerfile
## - Jobs : dockerbuild - ##
dockerbuild-vcx-android:
stage: dockerbuild
extends: .kaniko_large
dependencies:
- dockerbuild-vcx-libindy-ubuntu18
variables:
DOCKERFILE_PATH: vcx/wrappers/java/ci/android.dockerfile
DOCKER_IMAGE_NAME: vcx-android
KANIKO_ARGS: '--build-arg RUST_VER=${rustVersion}'
only:
refs:
- main
- cheqd
- stable
- /^docker-.*/
changes:
- .gitlab-ci.yml
- ci/libindy-ubuntu18.dockerfile
- vcx/wrappers/java/ci/android.dockerfile
before_script:
- sed -i "s|^FROM.*|FROM ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:${CI_COMMIT_REF_SLUG}|g" vcx/wrappers/java/ci/android.dockerfile
- grep '^FROM' vcx/wrappers/java/ci/android.dockerfile
.dockerbuild-vcx-python:
extends: .kaniko_micro
variables:
DOCKERFILE_PATH: ci/python.dockerfile
only:
refs:
- main
- cheqd
- stable
- /^docker-.*/
changes:
- .gitlab-ci.yml
- ci/python.dockerfile
dockerbuild-vcx-python-ubuntu18:
stage: dockerbuild
extends: .dockerbuild-vcx-python
dependencies:
- dockerbuild-vcx-libindy-ubuntu18
variables:
DOCKER_IMAGE_NAME: vcx-python-ubuntu18
only:
changes:
- .gitlab-ci.yml
- ci/libindy-ubuntu18.dockerfile
before_script:
- sed -i "s|^FROM.*|FROM ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:${CI_COMMIT_REF_SLUG}|g" ci/python.dockerfile
- grep '^FROM' ci/python.dockerfile
dockerbuild-vcx-java:
stage: dockerbuild
extends: .kaniko_micro
dependencies:
- dockerbuild-vcx-libindy-ubuntu18
variables:
DOCKERFILE_PATH: vcx/wrappers/java/ci/java.dockerfile
DOCKER_IMAGE_NAME: vcx-java
only:
refs:
- main
- cheqd
- stable
- /^docker-.*/
changes:
- .gitlab-ci.yml
- ci/libindy-ubuntu18.dockerfile
- vcx/wrappers/java/ci/java.dockerfile
before_script:
- sed -i "s|^FROM.*|FROM ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:${CI_COMMIT_REF_SLUG}|g" vcx/wrappers/java/ci/java.dockerfile
- grep '^FROM' vcx/wrappers/java/ci/java.dockerfile
# - Jobs : Build - ##
build-ios:
#TODO: break tests out into another pipeline. parallelize architecture builds.
stage: build
tags:
- macos
- bigsur
- xcode-12-4
artifacts:
expire_in: 1 week
paths:
- IOSBuilds/libvcxx86_64/*.zip
- IOSBuilds/libvcxx86_64/*.gz
- IOSBuilds/libvcxarm64/*.zip
- IOSBuilds/libvcxarm64/*.gz
variables:
vdrtoolsFullVersion: '0.8.6' # FIXME: drop IT!!!!
script:
- curl -s https://repo.corp.evernym.com/filely/ios/vcx-build-static-libs_${staticLibVersion}.tar.gz | tar -C ~/ -xvzf -
- which rustup-init || brew install rustup-init
- echo | rustup-init --default-toolchain ${rustVersion}
- source ~/.bash_profile
- mkdir -p ~/IOSBuilds/libvcxx86_64/ ~/IOSBuilds/libvcxarm64/
- cd vcx/libvcx && ./../ci/scripts/cargo-update-version
- export vcxRevision=$(git rev-parse HEAD | cut -c 1-7)
- cd -
- export vcxVersion=$(./vcx/ci/scripts/toml_utils.py ${PWD}/vcx/libvcx/Cargo.toml)
- export full_vcx_version="${vcxVersion}-${vcxRevision}"
- chmod +x vcx/ci/scripts/iosBuild.sh
- vcx/ci/scripts/iosBuild.sh ${vdrtoolsBranch} ${vdrtoolsFullVersion} ${rustVersion} ${full_vcx_version}
- mv ~/IOSBuilds ./
.build_android:
extends:
- .tags_large
artifacts:
expire_in: 1 week
paths:
- runtime_android_build/libvcx_${ARCH}/*.so
script:
- vcx/ci/scripts/androidBuild.sh ${ARCH}
build-android-x86-from-branch:
extends: .build_android
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-android:${CI_COMMIT_REF_SLUG}
variables:
ARCH: 'x86'
only:
refs:
- /^docker-.*/
build-android-x86-from-latest:
extends: .build_android
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-android:latest
variables:
ARCH: 'x86'
except:
refs:
- /^docker-.*/
build-android-x86_64-from-branch:
extends: .build_android
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-android:${CI_COMMIT_REF_SLUG}
variables:
ARCH: 'x86_64'
only:
refs:
- /^docker-.*/
build-android-x86_64-from-latest:
extends: .build_android
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-android:latest
variables:
ARCH: 'x86_64'
except:
refs:
- /^docker-.*/
build-android-arm-from-branch:
extends: .build_android
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-android:${CI_COMMIT_REF_SLUG}
variables:
ARCH: 'arm'
only:
refs:
- /^docker-.*/
build-android-arm-from-latest:
extends: .build_android
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-android:latest
variables:
ARCH: 'arm'
except:
refs:
- /^docker-.*/
build-android-arm64-from-branch:
extends: .build_android
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-android:${CI_COMMIT_REF_SLUG}
variables:
ARCH: 'arm64'
only:
refs:
- /^docker-.*/
build-android-arm64-from-latest:
extends: .build_android
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-android:latest
variables:
ARCH: 'arm64'
except:
refs:
- /^docker-.*/
build-android-armv7-from-branch:
extends: .build_android
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-android:${CI_COMMIT_REF_SLUG}
variables:
ARCH: 'armv7'
only:
refs:
- /^docker-.*/
build-android-armv7-from-latest:
extends: .build_android
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-android:latest
variables:
ARCH: 'armv7'
except:
refs:
- /^docker-.*/
build-consistent-vers-ts:
extends: .tags_micro
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18
stage: build-pre
artifacts:
expire_in: 1 week
expose_as: 'build_ts'
paths:
- output/build_ts
script:
- cd vcx/libvcx && ./../ci/scripts/cargo-update-version
.build-libvcx:
extends:
- .tags_large
artifacts:
expire_in: 1 week
paths:
- output/*
script:
- mkdir -p ${CI_PROJECT_DIR}/output
- cd vcx/libvcx && ./../ci/scripts/cargo-update-version
- export VCXREVISION=$(git rev-parse HEAD | cut -c 1-7)
- export VCXVERSION=$(${CI_PROJECT_DIR}/vcx/ci/scripts/toml_utils.py ${CI_PROJECT_DIR}/vcx/libvcx/Cargo.toml)
- cd ${CI_PROJECT_DIR}
- vcx/ci/scripts/package.sh ${RUSTTESTFLAG} ${VCXVERSION} ${VCXREVISION} ${PACKAGE_TYPE}
build-libvcx-ubuntu18-from-branch:
extends: .build-libvcx
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:${CI_COMMIT_REF_SLUG}
variables:
MYSQL_DATABASE: 'wallet'
MYSQL_ROOT_PASSWORD: 'root'
RUSTTESTFLAG: 'mysql'
PACKAGE_TYPE: 'bionic'
services:
- name: registry.gitlab.com/evernym/containers/indy-pool:1.9.2_1.0.2
alias: indy_pool
- name: mysql:5
alias: mysql
only:
refs:
- /^docker-.*/
build-libvcx-ubuntu18-from-latest:
extends: .build-libvcx
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:latest
stage: build
variables:
MYSQL_DATABASE: 'wallet'
MYSQL_ROOT_PASSWORD: 'root'
RUSTTESTFLAG: 'mysql'
PACKAGE_TYPE: 'bionic'
services:
- name: registry.gitlab.com/evernym/containers/indy-pool:1.9.2_1.0.2
alias: indy_pool
- name: mysql:5
alias: mysql
except:
refs:
- /^docker-.*/
build-libvcx-ubuntu20-from-branch:
extends: .build-libvcx
stage: build
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu20:${CI_COMMIT_REF_SLUG}
variables:
RUSTTESTFLAG: 'basic-tests'
PACKAGE_TYPE: 'focal'
only:
refs:
- /^docker-.*/
build-libvcx-ubuntu20-from-latest:
extends: .build-libvcx
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu20:latest
stage: build
variables:
RUSTTESTFLAG: 'basic-tests'
PACKAGE_TYPE: 'focal'
except:
refs:
- /^docker-.*/
#.build-libvcx-rpm:
# extends:
# - .tags_large
# variables:
# RUSTTESTFLAG: 'test'
# artifacts:
# expire_in: 1 week
# paths:
# - output/*
# script:
# - mkdir -p ${CI_PROJECT_DIR}/output
# - cd vcx/libvcx && ./../ci/scripts/cargo-update-version
# - export VCXREVISION=$(git rev-parse --short HEAD)
# - export VCXVERSION=$(${CI_PROJECT_DIR}/vcx/ci/scripts/toml_utils.py ${CI_PROJECT_DIR}/vcx/libvcx/Cargo.toml)
# - cd ${CI_PROJECT_DIR}
# - vcx/ci/scripts/package-rpm.sh ${RUSTTESTFLAG} ${VCXVERSION} ${VCXREVISION}
#
#build-libvcx-rpm-from-branch:
# extends: .build-libvcx-rpm
# stage: build
# image: ${CI_REGISTRY_IMAGE}/vcx-libindy-centos:${CI_COMMIT_REF_SLUG}
# only:
# refs:
# - /^docker-.*/
#
#build-libvcx-rpm-from-latest:
# extends: .build-libvcx-rpm
# image: ${CI_REGISTRY_IMAGE}/vcx-libindy-centos:latest
# stage: build
# except:
# refs:
# - /^docker-.*/
# - Jobs : Test - ##
.test-python-wrapper:
extends:
- .tags_large
variables:
PACKAGE_TYPE: 'bionic'
script:
- export PYTHONPATH="${CI_PROJECT_DIR}/vcx/wrappers/python3:vcx/wrappers/python3"
- sudo dpkg -i ${CI_PROJECT_DIR}/output/libvcx*${PACKAGE_TYPE}*.deb
- vcx/wrappers/python3/ci/test.sh
test-python-wrapper-from-branch:
extends: .test-python-wrapper
stage: test
image: ${CI_REGISTRY_IMAGE}/vcx-python-ubuntu18:${CI_COMMIT_REF_SLUG}
dependencies:
- build-libvcx-ubuntu18-from-branch
only:
refs:
- /^docker-.*/
test-python-wrapper-from-latest:
extends: .test-python-wrapper
stage: test
image: ${CI_REGISTRY_IMAGE}/vcx-python-ubuntu18:latest
dependencies:
- build-libvcx-ubuntu18-from-latest
except:
refs:
- /^docker-.*/
.test-java-wrapper:
extends:
- .tags_large
variables:
PACKAGE_TYPE: 'bionic'
script:
- sudo dpkg -i ${CI_PROJECT_DIR}/output/libvcx*${PACKAGE_TYPE}*.deb
- cd vcx/wrappers/java && ./gradlew --no-daemon test
test-java-wrapper-from-branch:
extends: .test-java-wrapper
stage: test
image: ${CI_REGISTRY_IMAGE}/vcx-java:${CI_COMMIT_REF_SLUG}
dependencies:
- build-libvcx-ubuntu18-from-branch
only:
refs:
- /^docker-.*/
test-java-wrapper-from-latest:
extends: .test-java-wrapper
stage: test
image: ${CI_REGISTRY_IMAGE}/vcx-java:latest
dependencies:
- build-libvcx-ubuntu18-from-latest
except:
refs:
- /^docker-.*/
.test-node-wrapper:
extends:
- .tags_large
variables:
PACKAGE_TYPE: 'bionic'
script:
- sudo dpkg -l
- sudo dpkg -i ${CI_PROJECT_DIR}/output/libvcx*${PACKAGE_TYPE}*.deb
- cd vcx/wrappers/node && npm i [email protected]
- cd ${CI_PROJECT_DIR} && vcx/wrappers/node/ci/test.sh
test-node-wrapper-ubuntu18-from-branch:
extends: .test-node-wrapper
stage: test
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:${CI_COMMIT_REF_SLUG}
dependencies:
- build-libvcx-ubuntu18-from-branch
only:
refs:
- /^docker-.*/
test-node-wrapper-ubuntu18-from-latest:
extends: .test-node-wrapper
stage: test
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:latest
dependencies:
- build-libvcx-ubuntu18-from-latest
except:
refs:
- /^docker-.*/
# - Jobs : Package - ##
.package-android:
extends:
- .tags_large
artifacts:
expire_in: 1 week
paths:
- vcx/wrappers/java/artifacts/aar/*.aar
- vcx/wrappers/java/artifacts/aar/*.jar
script:
- ls -al vcx/ci/scripts/androidPackage.sh
- sudo chmod +x vcx/ci/scripts/androidPackage.sh
- vcx/ci/scripts/androidPackage.sh
package-android-from-branch:
extends: .package-android
stage: package
image: ${CI_REGISTRY_IMAGE}/vcx-android:${CI_COMMIT_REF_SLUG}
only:
refs:
- /^docker-.*/
package-android-from-latest:
extends: .package-android
stage: package
image: ${CI_REGISTRY_IMAGE}/vcx-android:latest
except:
refs:
- /^docker-.*/
.package-python-wrapper:
extends: .tags_micro
artifacts:
expire_in: 1 week
paths:
- output/*
script:
- sudo dpkg -i ${CI_PROJECT_DIR}/output/libvcx*bionic*.deb
- cd vcx/libvcx && ./../ci/scripts/cargo-update-version
- cd -
- vcx/wrappers/python3/ci/package.sh
package-python-wrapper-from-branch:
extends: .package-python-wrapper
stage: package
image: ${CI_REGISTRY_IMAGE}/vcx-python-ubuntu18:${CI_COMMIT_REF_SLUG}
dependencies:
- build-libvcx-ubuntu18-from-branch
only:
refs:
- /^docker-.*/
package-python-wrapper-from-latest:
extends: .package-python-wrapper
stage: package
image: ${CI_REGISTRY_IMAGE}/vcx-python-ubuntu18:latest
dependencies:
- build-libvcx-ubuntu18-from-latest
except:
refs:
- /^docker-.*/
.package-java-wrapper:
extends: .tags_micro
artifacts:
expire_in: 1 week
paths:
- vcx/wrappers/java/artifacts/
script:
- sudo dpkg -i ${CI_PROJECT_DIR}/output/libvcx*bionic*.deb
- cd vcx/libvcx && ./../ci/scripts/cargo-update-version
- cd -
- vcx/wrappers/java/ci/buildJar.sh $(python3 vcx/ci/scripts/toml_utils.py vcx/libvcx/Cargo.toml)
package-java-wrapper-from-branch:
extends: .package-java-wrapper
stage: package
image: ${CI_REGISTRY_IMAGE}/vcx-java:${CI_COMMIT_REF_SLUG}
dependencies:
- build-libvcx-ubuntu18-from-branch
only:
refs:
- /^docker-.*/
package-java-wrapper-from-latest:
extends: .package-java-wrapper
stage: package
image: ${CI_REGISTRY_IMAGE}/vcx-java:latest
dependencies:
- build-libvcx-ubuntu18-from-latest
except:
refs:
- /^docker-.*/
.package-node-wrapper:
extends: .tags_micro
artifacts:
expire_in: 1 week
paths:
- output/*
script:
- sudo dpkg -i ${CI_PROJECT_DIR}/output/libvcx*bionic*.deb
- cd vcx/libvcx && ./../ci/scripts/cargo-update-version
- cd -
- vcx/wrappers/node/ci/package.sh
package-node-wrapper-from-branch:
extends: .package-node-wrapper
stage: package
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:${CI_COMMIT_REF_SLUG}
dependencies:
- build-libvcx-ubuntu18-from-branch
only:
refs:
- /^docker-.*/
package-node-wrapper-from-latest:
extends: .package-node-wrapper
stage: package
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:latest
dependencies:
- build-libvcx-ubuntu18-from-latest
except:
refs:
- /^docker-.*/
.package-react-native-wrapper:
extends: .tags_micro
artifacts:
expire_in: 1 week
paths:
- output/*
script:
- cd vcx/libvcx && ./../ci/scripts/cargo-update-version
- cd -
- vcx/wrappers/react-native/ci/package.sh
package-react-native-wrapper-from-branch:
extends: .package-react-native-wrapper
stage: package
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:${CI_COMMIT_REF_SLUG}
dependencies:
- build-libvcx-ubuntu18-from-branch
only:
refs:
- /^docker-.*/
package-react-native-wrapper-from-latest:
extends: .package-react-native-wrapper
stage: package
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:latest
dependencies:
- build-libvcx-ubuntu18-from-latest
except:
refs:
- /^docker-.*/
# - Jobs : Publish - ##
publish-android:
stage: publish
image: ${CI_REGISTRY_IMAGE}/vcx-android:latest
extends: .tags_micro
only:
refs:
- main@evernym/mobile/ev-vcx
- stable@evernym/mobile/ev-vcx
- cheqd@evernym/mobile/ev-vcx
- cheqddebug@evernym/mobile/ev-vcx
- vcx-aries-support
script:
- cd vcx/libvcx && ./../ci/scripts/cargo-update-version
- export vcxRevision=$(git rev-parse HEAD | cut -c 1-7)
- cd -
- export vcxVersion=$(./vcx/ci/scripts/toml_utils.py ${PWD}/vcx/libvcx/Cargo.toml)
- cp ${CLOUDREPO_SETTINGS_XML} ./settings.xml
- sudo chmod +x vcx/ci/scripts/androidPublish.sh
- vcx/ci/scripts/androidPublish.sh ${vcxVersion}-${vcxRevision}
publish-ios:
stage: publish
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu20:latest
extends: .tags_micro
only:
refs:
- main@evernym/mobile/ev-vcx
- stable@evernym/mobile/ev-vcx
- cheqd@evernym/mobile/ev-vcx
- vcx-aries-support
dependencies:
- build-ios
script:
#https://gitlab.com/gitlab-org/gitlab-ce/issues/27436
- export KRAKEN_CREDENTIALS=${KRK_USERNAME}:${KRK_PASSWORD}
- find ./IOSBuilds/libvcxx86_64/ -type f -name 'vcx.libvcxx86_64_*_universal.zip' -exec curl -u "${KRAKEN_CREDENTIALS}" -X POST https://kraken.corp.evernym.com/repo/ios/upload -F 'file=@{}' \;
- find ./IOSBuilds/libvcxx86_64/ -type f -name 'libvcx.a.libvcxx86_64_*_universal.tar.gz' -exec curl -u "${KRAKEN_CREDENTIALS}" -X POST https://kraken.corp.evernym.com/repo/ios/upload -F 'file=@{}' \;
- find ./IOSBuilds/libvcxarm64/ -type f -name 'vcx.libvcxarm64_*_universal.zip' -exec curl -u "${KRAKEN_CREDENTIALS}" -X POST https://kraken.corp.evernym.com/repo/ios/upload -F 'file=@{}' \;
- find ./IOSBuilds/libvcxarm64/ -type f -name 'libvcx.a.libvcxarm64_*_universal.tar.gz' -exec curl -u "${KRAKEN_CREDENTIALS}" -X POST https://kraken.corp.evernym.com/repo/ios/upload -F 'file=@{}' \;
publish-java-wrapper:
stage: publish
image: ${CI_REGISTRY_IMAGE}/vcx-java:${CI_COMMIT_REF_SLUG}
extends: .tags_micro
only:
refs:
- main@evernym/mobile/ev-vcx
- stable@evernym/mobile/ev-vcx
- vcx-aries-support
- cheqd
- cheqddebug
script:
- cp ${CLOUDREPO_SETTINGS_XML} ./settings.xml
- sudo chmod +x vcx/wrappers/java/ci/publishJar.sh
- vcx/wrappers/java/ci/publishJar.sh
publish-packages:
stage: publish
image: ${CI_REGISTRY_IMAGE}/vcx-libindy-ubuntu18:${CI_COMMIT_REF_SLUG}
extends: .tags_micro
only:
refs:
- main@evernym/mobile/ev-vcx
- stable@evernym/mobile/ev-vcx
- cheqd@evernym/mobile/ev-vcx
- cheqddebug@evernym/mobile/ev-vcx
script:
- ls -al ${CI_PROJECT_DIR}/output
- rename \s/~/-/ ${CI_PROJECT_DIR}/output/*.deb
#https://gitlab.com/gitlab-org/gitlab-ce/issues/27436
- export KRAKEN_CREDENTIALS=${KRK_USERNAME}:${KRK_PASSWORD}
- vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" libvcx*focal*.deb https://kraken.corp.evernym.com/repo/portal_dev/upload
- vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" libvcx*focal*.deb https://kraken.corp.evernym.com/repo/agency_dev/upload
- vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" libvcx*bionic*.deb https://kraken.corp.evernym.com/repo/portal_dev/upload
- vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" libvcx*bionic*.deb https://kraken.corp.evernym.com/repo/agency_dev/upload
# - vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" libvcx*.rpm https://kraken.corp.evernym.com/repo/portal_dev/upload
# - vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" libvcx*.rpm https://kraken.corp.evernym.com/repo/centos7/upload
- vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" node-vcx-*.tgz https://kraken.corp.evernym.com/repo/portal_dev/upload
- vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" node-vcx-*.tgz https://kraken.corp.evernym.com/repo/npm/upload
- vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" python3-vcx-*.tar.gz https://kraken.corp.evernym.com/repo/portal_dev/upload
- vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" python3-vcx-*.tar.gz https://kraken.corp.evernym.com/repo/python/upload
# - vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" evernym-react-native-sdk*.tgz https://kraken.corp.evernym.com/repo/portal_dev/upload
# - vcx/ci/scripts/publish.sh "${KRAKEN_CREDENTIALS}" evernym-react-native-sdk*.tgz https://kraken.corp.evernym.com/repo/npm/upload
publish-vcx-packages-to-gitlab:
stage: publish
image: ${CI_REGISTRY_IMAGE}/vcx-python-ubuntu18:latest
extends: .tags_micro
rules:
- if: $CI_COMMIT_REF_SLUG == "stable" && $CI_PROJECT_PATH == "evernym/mobile/ev-vcx"
variables:
vcxPackageVer: ${vcxVersion}
- if: $CI_COMMIT_REF_SLUG == "main" && $CI_PROJECT_PATH == "evernym/mobile/ev-vcx"
variables:
vcxPackageVer: ${vcxVersion}-${CI_PIPELINE_IID}
script:
- ls -al ${CI_PROJECT_DIR}/output
- rename \s/~/_/ ${CI_PROJECT_DIR}/output/*.deb
- ls -al ${CI_PROJECT_DIR}/output
- >
find ./output/ -name "node-vcx-*.tgz" -exec
curl --header "DEPLOY-TOKEN: ${VCX_DEPLOY_TOKEN}" --upload-file {}
"https://gitlab.com/api/v4/projects/evernym%2Fmobile%2Fev-vcx/packages/generic/vcx/${vcxPackageVer}/" \;
- >
find ./output/ -name "python3-vcx-*.tar.gz" -exec
curl --header "DEPLOY-TOKEN: ${VCX_DEPLOY_TOKEN}" --upload-file {}
"https://gitlab.com/api/v4/projects/evernym%2Fmobile%2Fev-vcx/packages/generic/vcx/${vcxPackageVer}/" \;
- >
find ./output/ -name "evernym-react-native-sdk*.tgz" -exec
curl --header "DEPLOY-TOKEN: ${VCX_DEPLOY_TOKEN}" --upload-file {}
"https://gitlab.com/api/v4/projects/evernym%2Fmobile%2Fev-vcx/packages/generic/vcx/${vcxPackageVer}/" \;
- >
find ./output/ -name "libvcx*bionic*.deb" -exec
curl --header "DEPLOY-TOKEN: ${VCX_DEPLOY_TOKEN}" --upload-file {}
"https://gitlab.com/api/v4/projects/evernym%2Fmobile%2Fev-vcx/packages/generic/vcx/${vcxPackageVer}/" \;
- >
find ./output/ -name "libvcx*focal*.deb" -exec
curl --header "DEPLOY-TOKEN: ${VCX_DEPLOY_TOKEN}" --upload-file {}
"https://gitlab.com/api/v4/projects/evernym%2Fmobile%2Fev-vcx/packages/generic/vcx/${vcxPackageVer}/" \;
publish-mobile-sdk:
stage: publish
image: ${CI_REGISTRY_IMAGE}/vcx-python-ubuntu18:latest
extends: .tags_micro
rules:
- if: $CI_COMMIT_REF_SLUG == "stable" && $CI_PROJECT_PATH == "evernym/mobile/ev-vcx"
variables:
msdkPackageVer: ${msdkVersion}
- if: $CI_COMMIT_REF_SLUG == "main" && $CI_PROJECT_PATH == "evernym/mobile/ev-vcx"
variables:
msdkPackageVer: ${msdkVersion}-${CI_PIPELINE_ID}
script:
- >
find ./vcx/wrappers/java/artifacts/aar/ -name "*.aar" -exec
curl --header "DEPLOY-TOKEN: ${MSDK_DEPLOY_TOKEN}" --upload-file {}
"https://gitlab.com/api/v4/projects/evernym%2Fmobile%2Fmobile-sdk/packages/generic/vcx/${msdkPackageVer}/" \;
- >
find ./IOSBuilds/libvcx{x86_64,arm64}/ -name "vcx.libvcx*.zip" -exec
curl --header "DEPLOY-TOKEN: ${MSDK_DEPLOY_TOKEN}" --upload-file {}
"https://gitlab.com/api/v4/projects/evernym%2Fmobile%2Fmobile-sdk/packages/generic/vcx/${msdkPackageVer}/" \;
- >
find ./output/ -name "evernym-react-native-sdk*.tgz" -exec
curl --header "DEPLOY-TOKEN: ${MSDK_DEPLOY_TOKEN}" --upload-file {}
"https://gitlab.com/api/v4/projects/evernym%2Fmobile%2Fmobile-sdk/packages/generic/vcx/${msdkPackageVer}/" \;
publish-vcx-tag:
stage: tag
image: ${CI_REGISTRY_IMAGE}/vcx-python-ubuntu18:latest
extends: .tags_micro
only:
refs:
- stable@evernym/mobile/ev-vcx
script:
- curl -X POST "https://gitlab.com/api/v4/projects/evernym%2Fmobile%2Fev-vcx/repository/tags?tag_name=v${vcxPackageVer}&ref=stable&private_token=${VCX_GITLAB_API_TOKEN}"