-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
config.yml
2659 lines (2522 loc) · 114 KB
/
config.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
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### ***
### WARNING: DO NOT manually EDIT or MERGE this file, it is generated by 'make ci-config'.
### INSTEAD: Edit or merge the source in config/ then run 'make ci-config'.
### ***
# Orb 'circleci/slack@3.2.0' resolved to 'circleci/slack@3.2.0'
version: 2
jobs:
bundle-releases:
docker:
- image: docker.mirror.hashicorp.services/circleci/buildpack-deps
shell: /usr/bin/env bash -euo pipefail -c
steps:
- checkout:
path: .
- run:
command: make -C packages*.lock write-all-package-cache-keys
name: Write all package cache keys
- run:
command: mkdir -p .buildcache && echo "*" > .buildcache/.gitignore
name: Ignore .buildcache
- restore_cache:
key: package-4006f4bc9be5251d1e91cc419ea21e251fde5f8b-{{checksum ".buildcache/cache-keys/package-4006f4bc9be5251d1e91cc419ea21e251fde5f8b"}}
name: Restore package cache
- restore_cache:
key: package-6ede705a8f7bae58b5bd979507ed0565af4a193f-{{checksum ".buildcache/cache-keys/package-6ede705a8f7bae58b5bd979507ed0565af4a193f"}}
name: Restore package cache
- restore_cache:
key: package-e10bd72e021444660e25723422969eddd8853680-{{checksum ".buildcache/cache-keys/package-e10bd72e021444660e25723422969eddd8853680"}}
name: Restore package cache
- restore_cache:
key: package-89f5f036e8ae97a97ad70f80f696518908f227d2-{{checksum ".buildcache/cache-keys/package-89f5f036e8ae97a97ad70f80f696518908f227d2"}}
name: Restore package cache
- restore_cache:
key: package-50d2873ac4ea36f320c76805a014cdf1afcc8891-{{checksum ".buildcache/cache-keys/package-50d2873ac4ea36f320c76805a014cdf1afcc8891"}}
name: Restore package cache
- restore_cache:
key: package-d0c51e7a4f1026914af4a84e8f4845d8f3e8bb13-{{checksum ".buildcache/cache-keys/package-d0c51e7a4f1026914af4a84e8f4845d8f3e8bb13"}}
name: Restore package cache
- restore_cache:
key: package-82d9ade3428fbc8651626c2774ff98c7fe29edbc-{{checksum ".buildcache/cache-keys/package-82d9ade3428fbc8651626c2774ff98c7fe29edbc"}}
name: Restore package cache
- restore_cache:
key: package-b178412eedfdf13c1158a9f6f6f5c9930fc46c0d-{{checksum ".buildcache/cache-keys/package-b178412eedfdf13c1158a9f6f6f5c9930fc46c0d"}}
name: Restore package cache
- restore_cache:
key: package-edf61fcebdd53215b0c22105f747e0956d201873-{{checksum ".buildcache/cache-keys/package-edf61fcebdd53215b0c22105f747e0956d201873"}}
name: Restore package cache
- restore_cache:
key: package-25f17319c9131c4d61b159cc59a0ece53732132e-{{checksum ".buildcache/cache-keys/package-25f17319c9131c4d61b159cc59a0ece53732132e"}}
name: Restore package cache
- restore_cache:
key: package-deedb835b1479796438619d160ed88f7bd15daec-{{checksum ".buildcache/cache-keys/package-deedb835b1479796438619d160ed88f7bd15daec"}}
name: Restore package cache
- restore_cache:
key: package-086c893527df73b7ab6faf9fe3a43dd4086b4726-{{checksum ".buildcache/cache-keys/package-086c893527df73b7ab6faf9fe3a43dd4086b4726"}}
name: Restore package cache
- restore_cache:
key: package-9dd79ddac3467440e75a2050d9a5cf3129374a24-{{checksum ".buildcache/cache-keys/package-9dd79ddac3467440e75a2050d9a5cf3129374a24"}}
name: Restore package cache
- restore_cache:
key: package-d88dad2ddaacf251c58133bbcf54b25ebe51e088-{{checksum ".buildcache/cache-keys/package-d88dad2ddaacf251c58133bbcf54b25ebe51e088"}}
name: Restore package cache
- restore_cache:
key: package-4d491185e2df1305ba6215297a0237c1636263da-{{checksum ".buildcache/cache-keys/package-4d491185e2df1305ba6215297a0237c1636263da"}}
name: Restore package cache
- restore_cache:
key: package-8aed2751f329e469622e390eadad25aab9926055-{{checksum ".buildcache/cache-keys/package-8aed2751f329e469622e390eadad25aab9926055"}}
name: Restore package cache
- run:
command: make package-meta-all
name: Write Package Metadata
- run:
command: make aliases
name: Write package aliases
- run:
command: ls -lahR .buildcache
name: List Build Cache
- run:
command: cp packages*.lock/pkgs.yml lockfile-d7a5e62804cdada9.yml
name: Update Lockfile Name
- run:
command: tar -czf packages-d7a5e62804cdada9.tar.gz .buildcache/packages lockfile-d7a5e62804cdada9.yml
name: Create Raw Package Tarball
- run:
command: tar -czf meta-d7a5e62804cdada9.tar.gz .buildcache/packages/store/*.json lockfile-d7a5e62804cdada9.yml
name: Create Metadata Tarball
- store_artifacts:
path: lockfile-d7a5e62804cdada9.yml
- store_artifacts:
path: packages-d7a5e62804cdada9.tar.gz
- store_artifacts:
path: meta-d7a5e62804cdada9.tar.gz
- store_artifacts:
path: .buildcache/packages
environment:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
darwin_amd64_package:
docker:
- image: docker.mirror.hashicorp.services/circleci/buildpack-deps
shell: /usr/bin/env bash -euo pipefail -c
environment:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: 4006f4bc9be5251d1e91cc419ea21e251fde5f8b
steps:
- setup_remote_docker:
docker_layer_caching: false
version: 19.03.12
- add_ssh_keys:
fingerprints:
- 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06
- checkout:
path: .
- run:
command: make -C packages*.lock write-package-cache-key
name: Write package cache key
- restore_cache:
key: package-4006f4bc9be5251d1e91cc419ea21e251fde5f8b-{{checksum ".buildcache/cache-keys/package-4006f4bc9be5251d1e91cc419ea21e251fde5f8b"}}
name: Restore package cache
- run:
command: |2
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
echo "No package found, continuing with build."
exit 0
fi
echo "Package already cached, skipping build."
circleci-agent step halt
name: Check cache status
- run:
command: make -C packages*.lock write-builder-cache-keys
name: Write builder layer cache keys
- restore_cache:
key: copy-source_f8c9_{{checksum ".buildcache/cache-keys/copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431"}}
keys:
- go-modules_4091_{{checksum ".buildcache/cache-keys/go-modules-409192a337b6b4d73eb4db8ebe129d80a07f0240"}}
- build-ui_56fd_{{checksum ".buildcache/cache-keys/build-ui-56fdf76d2f21d10e2c047118b5ca3047fe9f9631"}}
- ui-dependencies_f119_{{checksum ".buildcache/cache-keys/ui-dependencies-f1195de0c93338b9a7d10cb5bcfaa43ff84356a3"}}
- make-ui-folder_dd84_{{checksum ".buildcache/cache-keys/make-ui-folder-dd841e59773bc3aede8afcba822c6299bb4bfb22"}}
- install-yarn_7190_{{checksum ".buildcache/cache-keys/install-yarn-719038db127c6b5911b94bca960f400de295ce03"}}
- set-workdir_8501_{{checksum ".buildcache/cache-keys/set-workdir-8501be786ebe0e2b40af1d5552ccf01ef3800a3b"}}
- install-go-tools_0710_{{checksum ".buildcache/cache-keys/install-go-tools-0710abce612bbb54bad15324c25d987eaf392b89"}}
- install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}}
- base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}}
name: 'Restore Builder Image Cache: copy-source'
- run:
command: make -C packages*.lock load-builder-cache
name: Load whatever builder cache we have (if any) into the Docker daemon
no_output_timeout: 30m
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -C packages*.lock package
name: Compile Package
- run:
command: ls -lahR .buildcache/packages
name: List packages
- save_cache:
key: package-4006f4bc9be5251d1e91cc419ea21e251fde5f8b-{{checksum ".buildcache/cache-keys/package-4006f4bc9be5251d1e91cc419ea21e251fde5f8b"}}
name: Save package cache
paths:
- .buildcache/packages/store
darwin_arm64_package:
docker:
- image: docker.mirror.hashicorp.services/circleci/buildpack-deps
shell: /usr/bin/env bash -euo pipefail -c
environment:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: 6ede705a8f7bae58b5bd979507ed0565af4a193f
steps:
- setup_remote_docker:
docker_layer_caching: false
version: 19.03.12
- add_ssh_keys:
fingerprints:
- 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06
- checkout:
path: .
- run:
command: make -C packages*.lock write-package-cache-key
name: Write package cache key
- restore_cache:
key: package-6ede705a8f7bae58b5bd979507ed0565af4a193f-{{checksum ".buildcache/cache-keys/package-6ede705a8f7bae58b5bd979507ed0565af4a193f"}}
name: Restore package cache
- run:
command: |2
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
echo "No package found, continuing with build."
exit 0
fi
echo "Package already cached, skipping build."
circleci-agent step halt
name: Check cache status
- run:
command: make -C packages*.lock write-builder-cache-keys
name: Write builder layer cache keys
- restore_cache:
key: copy-source_f8c9_{{checksum ".buildcache/cache-keys/copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431"}}
keys:
- go-modules_4091_{{checksum ".buildcache/cache-keys/go-modules-409192a337b6b4d73eb4db8ebe129d80a07f0240"}}
- build-ui_56fd_{{checksum ".buildcache/cache-keys/build-ui-56fdf76d2f21d10e2c047118b5ca3047fe9f9631"}}
- ui-dependencies_f119_{{checksum ".buildcache/cache-keys/ui-dependencies-f1195de0c93338b9a7d10cb5bcfaa43ff84356a3"}}
- make-ui-folder_dd84_{{checksum ".buildcache/cache-keys/make-ui-folder-dd841e59773bc3aede8afcba822c6299bb4bfb22"}}
- install-yarn_7190_{{checksum ".buildcache/cache-keys/install-yarn-719038db127c6b5911b94bca960f400de295ce03"}}
- set-workdir_8501_{{checksum ".buildcache/cache-keys/set-workdir-8501be786ebe0e2b40af1d5552ccf01ef3800a3b"}}
- install-go-tools_0710_{{checksum ".buildcache/cache-keys/install-go-tools-0710abce612bbb54bad15324c25d987eaf392b89"}}
- install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}}
- base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}}
name: 'Restore Builder Image Cache: copy-source'
- run:
command: make -C packages*.lock load-builder-cache
name: Load whatever builder cache we have (if any) into the Docker daemon
no_output_timeout: 30m
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -C packages*.lock package
name: Compile Package
- run:
command: ls -lahR .buildcache/packages
name: List packages
- save_cache:
key: package-6ede705a8f7bae58b5bd979507ed0565af4a193f-{{checksum ".buildcache/cache-keys/package-6ede705a8f7bae58b5bd979507ed0565af4a193f"}}
name: Save package cache
paths:
- .buildcache/packages/store
windows_386_package:
docker:
- image: docker.mirror.hashicorp.services/circleci/buildpack-deps
shell: /usr/bin/env bash -euo pipefail -c
environment:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: 4d491185e2df1305ba6215297a0237c1636263da
steps:
- setup_remote_docker:
docker_layer_caching: false
version: 19.03.12
- add_ssh_keys:
fingerprints:
- 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06
- checkout:
path: .
- run:
command: make -C packages*.lock write-package-cache-key
name: Write package cache key
- restore_cache:
key: package-4d491185e2df1305ba6215297a0237c1636263da-{{checksum ".buildcache/cache-keys/package-4d491185e2df1305ba6215297a0237c1636263da"}}
name: Restore package cache
- run:
command: |2
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
echo "No package found, continuing with build."
exit 0
fi
echo "Package already cached, skipping build."
circleci-agent step halt
name: Check cache status
- run:
command: make -C packages*.lock write-builder-cache-keys
name: Write builder layer cache keys
- restore_cache:
key: copy-source_f8c9_{{checksum ".buildcache/cache-keys/copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431"}}
keys:
- go-modules_4091_{{checksum ".buildcache/cache-keys/go-modules-409192a337b6b4d73eb4db8ebe129d80a07f0240"}}
- build-ui_56fd_{{checksum ".buildcache/cache-keys/build-ui-56fdf76d2f21d10e2c047118b5ca3047fe9f9631"}}
- ui-dependencies_f119_{{checksum ".buildcache/cache-keys/ui-dependencies-f1195de0c93338b9a7d10cb5bcfaa43ff84356a3"}}
- make-ui-folder_dd84_{{checksum ".buildcache/cache-keys/make-ui-folder-dd841e59773bc3aede8afcba822c6299bb4bfb22"}}
- install-yarn_7190_{{checksum ".buildcache/cache-keys/install-yarn-719038db127c6b5911b94bca960f400de295ce03"}}
- set-workdir_8501_{{checksum ".buildcache/cache-keys/set-workdir-8501be786ebe0e2b40af1d5552ccf01ef3800a3b"}}
- install-go-tools_0710_{{checksum ".buildcache/cache-keys/install-go-tools-0710abce612bbb54bad15324c25d987eaf392b89"}}
- install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}}
- base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}}
name: 'Restore Builder Image Cache: copy-source'
- run:
command: make -C packages*.lock load-builder-cache
name: Load whatever builder cache we have (if any) into the Docker daemon
no_output_timeout: 30m
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -C packages*.lock package
name: Compile Package
- run:
command: ls -lahR .buildcache/packages
name: List packages
- save_cache:
key: package-4d491185e2df1305ba6215297a0237c1636263da-{{checksum ".buildcache/cache-keys/package-4d491185e2df1305ba6215297a0237c1636263da"}}
name: Save package cache
paths:
- .buildcache/packages/store
install-ui-dependencies:
docker:
- image: docker.mirror.hashicorp.services/node:14-buster
shell: /usr/bin/env bash -euo pipefail -c
working_directory: /go/src/github.com/hashicorp/vault
steps:
- checkout
- restore_cache:
key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }}
name: Restore yarn cache
- run:
command: |
cd ui
yarn install
npm rebuild node-sass
name: Install UI dependencies
- save_cache:
key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }}
name: Save yarn cache
paths:
- ui/node_modules
build-common-layers:
machine:
image: ubuntu-1604:202007-01
resource_class: xlarge
shell: /usr/bin/env bash -euo pipefail -c
steps:
- add_ssh_keys:
fingerprints:
- 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06
- checkout:
path: .
- run:
command: make -C packages*.lock write-builder-cache-keys
name: Write builder layer cache keys
- restore_cache:
key: copy-source_f8c9_{{checksum ".buildcache/cache-keys/copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431"}}
keys:
- go-modules_4091_{{checksum ".buildcache/cache-keys/go-modules-409192a337b6b4d73eb4db8ebe129d80a07f0240"}}
- build-ui_56fd_{{checksum ".buildcache/cache-keys/build-ui-56fdf76d2f21d10e2c047118b5ca3047fe9f9631"}}
- ui-dependencies_f119_{{checksum ".buildcache/cache-keys/ui-dependencies-f1195de0c93338b9a7d10cb5bcfaa43ff84356a3"}}
- make-ui-folder_dd84_{{checksum ".buildcache/cache-keys/make-ui-folder-dd841e59773bc3aede8afcba822c6299bb4bfb22"}}
- install-yarn_7190_{{checksum ".buildcache/cache-keys/install-yarn-719038db127c6b5911b94bca960f400de295ce03"}}
- set-workdir_8501_{{checksum ".buildcache/cache-keys/set-workdir-8501be786ebe0e2b40af1d5552ccf01ef3800a3b"}}
- install-go-tools_0710_{{checksum ".buildcache/cache-keys/install-go-tools-0710abce612bbb54bad15324c25d987eaf392b89"}}
- install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}}
- base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}}
name: 'Restore Layer Cache: copy-source'
- run:
command: LAYER_SPEC_ID=09-copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431 make -C packages*.lock load-builder-cache
name: Load whatever builder cache we have (if any) into the Docker daemon
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -f packages*.lock/layer.mk 00-base-c6cdf1b224722d2520e082320f2a71875913247c-image
name: Build base layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -f packages*.lock/layer.mk 01-install-go-8856aed7b0bd773b4539b957c157d21ff7b05758-image
name: Build install-go layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -f packages*.lock/layer.mk 02-install-go-tools-0710abce612bbb54bad15324c25d987eaf392b89-image
name: Build install-go-tools layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -f packages*.lock/layer.mk 03-set-workdir-8501be786ebe0e2b40af1d5552ccf01ef3800a3b-image
name: Build set-workdir layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -f packages*.lock/layer.mk 04-install-yarn-719038db127c6b5911b94bca960f400de295ce03-image
name: Build install-yarn layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -f packages*.lock/layer.mk 05-make-ui-folder-dd841e59773bc3aede8afcba822c6299bb4bfb22-image
name: Build make-ui-folder layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -f packages*.lock/layer.mk 06-ui-dependencies-f1195de0c93338b9a7d10cb5bcfaa43ff84356a3-image
name: Build ui-dependencies layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -f packages*.lock/layer.mk 07-build-ui-56fdf76d2f21d10e2c047118b5ca3047fe9f9631-image
name: Build build-ui layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -f packages*.lock/layer.mk 08-go-modules-409192a337b6b4d73eb4db8ebe129d80a07f0240-image
name: Build go-modules layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -f packages*.lock/layer.mk 09-copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431-image
name: Build copy-source layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -f packages*.lock/layer.mk 09-copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431-save
name: Build copy-source layer
- save_cache:
key: copy-source_f8c9_{{checksum ".buildcache/cache-keys/copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431"}}
name: 'Save Layer Cache: copy-source'
paths:
- .buildcache/archives/09-copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431.tar.gz
environment:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
linux_arm64_package:
docker:
- image: docker.mirror.hashicorp.services/circleci/buildpack-deps
shell: /usr/bin/env bash -euo pipefail -c
environment:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: edf61fcebdd53215b0c22105f747e0956d201873
steps:
- setup_remote_docker:
docker_layer_caching: false
version: 19.03.12
- add_ssh_keys:
fingerprints:
- 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06
- checkout:
path: .
- run:
command: make -C packages*.lock write-package-cache-key
name: Write package cache key
- restore_cache:
key: package-edf61fcebdd53215b0c22105f747e0956d201873-{{checksum ".buildcache/cache-keys/package-edf61fcebdd53215b0c22105f747e0956d201873"}}
name: Restore package cache
- run:
command: |2
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
echo "No package found, continuing with build."
exit 0
fi
echo "Package already cached, skipping build."
circleci-agent step halt
name: Check cache status
- run:
command: make -C packages*.lock write-builder-cache-keys
name: Write builder layer cache keys
- restore_cache:
key: copy-source_f8c9_{{checksum ".buildcache/cache-keys/copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431"}}
keys:
- go-modules_4091_{{checksum ".buildcache/cache-keys/go-modules-409192a337b6b4d73eb4db8ebe129d80a07f0240"}}
- build-ui_56fd_{{checksum ".buildcache/cache-keys/build-ui-56fdf76d2f21d10e2c047118b5ca3047fe9f9631"}}
- ui-dependencies_f119_{{checksum ".buildcache/cache-keys/ui-dependencies-f1195de0c93338b9a7d10cb5bcfaa43ff84356a3"}}
- make-ui-folder_dd84_{{checksum ".buildcache/cache-keys/make-ui-folder-dd841e59773bc3aede8afcba822c6299bb4bfb22"}}
- install-yarn_7190_{{checksum ".buildcache/cache-keys/install-yarn-719038db127c6b5911b94bca960f400de295ce03"}}
- set-workdir_8501_{{checksum ".buildcache/cache-keys/set-workdir-8501be786ebe0e2b40af1d5552ccf01ef3800a3b"}}
- install-go-tools_0710_{{checksum ".buildcache/cache-keys/install-go-tools-0710abce612bbb54bad15324c25d987eaf392b89"}}
- install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}}
- base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}}
name: 'Restore Builder Image Cache: copy-source'
- run:
command: make -C packages*.lock load-builder-cache
name: Load whatever builder cache we have (if any) into the Docker daemon
no_output_timeout: 30m
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -C packages*.lock package
name: Compile Package
- run:
command: ls -lahR .buildcache/packages
name: List packages
- save_cache:
key: package-edf61fcebdd53215b0c22105f747e0956d201873-{{checksum ".buildcache/cache-keys/package-edf61fcebdd53215b0c22105f747e0956d201873"}}
name: Save package cache
paths:
- .buildcache/packages/store
test-ui:
docker:
- image: docker.mirror.hashicorp.services/node:14-buster
shell: /usr/bin/env bash -euo pipefail -c
working_directory: /go/src/github.com/hashicorp/vault
resource_class: xlarge
steps:
- run:
command: |
case "$CIRCLE_BRANCH" in
main|ui/*|release/*|merge*) ;;
*) # If the branch being tested doesn't match one of the above patterns,
# we don't need to run test-ui and can abort the job.
circleci-agent step halt
;;
esac
# exit with success either way
exit 0
name: Check branch name
working_directory: ~/
- checkout
- restore_cache:
key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }}
name: Restore yarn cache
- attach_workspace:
at: .
- run:
command: |
set -x
# Install Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub \
| apt-key add -
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" \
| tee /etc/apt/sources.list.d/google-chrome.list
apt-get update
apt-get -y install google-chrome-stable
rm /etc/apt/sources.list.d/google-chrome.list
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
# Add ./bin to the PATH so vault binary can be run by Ember tests
export PATH="${PWD}/bin:${PATH}"
# Run Ember tests
cd ui
mkdir -p test-results/qunit
yarn test:oss
name: Test UI
- store_artifacts:
path: ui/test-results
- store_test_results:
path: ui/test-results
linux_arm_package:
docker:
- image: docker.mirror.hashicorp.services/circleci/buildpack-deps
shell: /usr/bin/env bash -euo pipefail -c
environment:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: b178412eedfdf13c1158a9f6f6f5c9930fc46c0d
steps:
- setup_remote_docker:
docker_layer_caching: false
version: 19.03.12
- add_ssh_keys:
fingerprints:
- 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06
- checkout:
path: .
- run:
command: make -C packages*.lock write-package-cache-key
name: Write package cache key
- restore_cache:
key: package-b178412eedfdf13c1158a9f6f6f5c9930fc46c0d-{{checksum ".buildcache/cache-keys/package-b178412eedfdf13c1158a9f6f6f5c9930fc46c0d"}}
name: Restore package cache
- run:
command: |2
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
echo "No package found, continuing with build."
exit 0
fi
echo "Package already cached, skipping build."
circleci-agent step halt
name: Check cache status
- run:
command: make -C packages*.lock write-builder-cache-keys
name: Write builder layer cache keys
- restore_cache:
key: copy-source_f8c9_{{checksum ".buildcache/cache-keys/copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431"}}
keys:
- go-modules_4091_{{checksum ".buildcache/cache-keys/go-modules-409192a337b6b4d73eb4db8ebe129d80a07f0240"}}
- build-ui_56fd_{{checksum ".buildcache/cache-keys/build-ui-56fdf76d2f21d10e2c047118b5ca3047fe9f9631"}}
- ui-dependencies_f119_{{checksum ".buildcache/cache-keys/ui-dependencies-f1195de0c93338b9a7d10cb5bcfaa43ff84356a3"}}
- make-ui-folder_dd84_{{checksum ".buildcache/cache-keys/make-ui-folder-dd841e59773bc3aede8afcba822c6299bb4bfb22"}}
- install-yarn_7190_{{checksum ".buildcache/cache-keys/install-yarn-719038db127c6b5911b94bca960f400de295ce03"}}
- set-workdir_8501_{{checksum ".buildcache/cache-keys/set-workdir-8501be786ebe0e2b40af1d5552ccf01ef3800a3b"}}
- install-go-tools_0710_{{checksum ".buildcache/cache-keys/install-go-tools-0710abce612bbb54bad15324c25d987eaf392b89"}}
- install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}}
- base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}}
name: 'Restore Builder Image Cache: copy-source'
- run:
command: make -C packages*.lock load-builder-cache
name: Load whatever builder cache we have (if any) into the Docker daemon
no_output_timeout: 30m
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -C packages*.lock package
name: Compile Package
- run:
command: ls -lahR .buildcache/packages
name: List packages
- save_cache:
key: package-b178412eedfdf13c1158a9f6f6f5c9930fc46c0d-{{checksum ".buildcache/cache-keys/package-b178412eedfdf13c1158a9f6f6f5c9930fc46c0d"}}
name: Save package cache
paths:
- .buildcache/packages/store
test-ui-browserstack:
docker:
- image: docker.mirror.hashicorp.services/node:14-buster
shell: /usr/bin/env bash -euo pipefail -c
working_directory: /go/src/github.com/hashicorp/vault
resource_class: xlarge
steps:
- checkout
- restore_cache:
key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }}
name: Restore yarn cache
- attach_workspace:
at: .
- run:
command: |
# Add ./bin to the PATH so vault binary can be found.
export PATH="${PWD}"/bin:${PATH}
make test-ui-browserstack
name: Run Browserstack Tests
build-go-dev:
machine: true
shell: /usr/bin/env bash -euo pipefail -c
working_directory: /go/src/github.com/hashicorp/vault
steps:
- run:
command: |
[ -n "$GO_VERSION" ] || { echo "You must set GO_VERSION"; exit 1; }
# Install Go
curl -sSLO "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go${GO_VERSION}.linux-amd64.tar.gz"
rm -f "go${GO_VERSION}.linux-amd64.tar.gz"
GOPATH="/go"
mkdir $GOPATH 2>/dev/null || { sudo mkdir $GOPATH && sudo chmod 777 $GOPATH; }
echo "export GOPATH='$GOPATH'" >> "$BASH_ENV"
echo "export PATH='$PATH:$GOPATH/bin:/usr/local/go/bin'" >> "$BASH_ENV"
echo "export GOPROXY=off" >> "$BASH_ENV"
echo "export GOPRIVATE=github.com/hashicorp/*" >> "$BASH_ENV"
echo "$ go version"
go version
name: Setup Go
working_directory: ~/
- checkout
- restore_cache:
keys:
- v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}}
name: Restore exact go modules cache
- attach_workspace:
at: .
- run:
command: |
# Move dev UI assets to expected location
rm -rf ./pkg
mkdir ./pkg
# Build dev binary
make ci-bootstrap dev
name: Build dev binary
- persist_to_workspace:
paths:
- bin
root: .
environment:
- CIRCLECI_CLI_VERSION: 0.1.5546
- GO_TAGS: ''
- GO_VERSION: 1.16.7
- GOTESTSUM_VERSION: 0.5.2
algolia-index:
docker:
- image: node:12
steps:
- checkout
- run:
command: |
if [ "$CIRCLE_REPOSITORY_URL" != "git@github.com:hashicorp/vault.git" ]; then
echo "Not Vault OSS Repo, not indexing Algolia"
exit 0
fi
cd website/
npm install
node scripts/index_search_content.js
name: Push content to Algolia Index
linux_386_package:
docker:
- image: docker.mirror.hashicorp.services/circleci/buildpack-deps
shell: /usr/bin/env bash -euo pipefail -c
environment:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: d0c51e7a4f1026914af4a84e8f4845d8f3e8bb13
steps:
- setup_remote_docker:
docker_layer_caching: false
version: 19.03.12
- add_ssh_keys:
fingerprints:
- 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06
- checkout:
path: .
- run:
command: make -C packages*.lock write-package-cache-key
name: Write package cache key
- restore_cache:
key: package-d0c51e7a4f1026914af4a84e8f4845d8f3e8bb13-{{checksum ".buildcache/cache-keys/package-d0c51e7a4f1026914af4a84e8f4845d8f3e8bb13"}}
name: Restore package cache
- run:
command: |2
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
echo "No package found, continuing with build."
exit 0
fi
echo "Package already cached, skipping build."
circleci-agent step halt
name: Check cache status
- run:
command: make -C packages*.lock write-builder-cache-keys
name: Write builder layer cache keys
- restore_cache:
key: copy-source_f8c9_{{checksum ".buildcache/cache-keys/copy-source-f8c945f7ae027d3dbcdd9b0a2cd183f0c7aa9431"}}
keys:
- go-modules_4091_{{checksum ".buildcache/cache-keys/go-modules-409192a337b6b4d73eb4db8ebe129d80a07f0240"}}
- build-ui_56fd_{{checksum ".buildcache/cache-keys/build-ui-56fdf76d2f21d10e2c047118b5ca3047fe9f9631"}}
- ui-dependencies_f119_{{checksum ".buildcache/cache-keys/ui-dependencies-f1195de0c93338b9a7d10cb5bcfaa43ff84356a3"}}
- make-ui-folder_dd84_{{checksum ".buildcache/cache-keys/make-ui-folder-dd841e59773bc3aede8afcba822c6299bb4bfb22"}}
- install-yarn_7190_{{checksum ".buildcache/cache-keys/install-yarn-719038db127c6b5911b94bca960f400de295ce03"}}
- set-workdir_8501_{{checksum ".buildcache/cache-keys/set-workdir-8501be786ebe0e2b40af1d5552ccf01ef3800a3b"}}
- install-go-tools_0710_{{checksum ".buildcache/cache-keys/install-go-tools-0710abce612bbb54bad15324c25d987eaf392b89"}}
- install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}}
- base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}}
name: 'Restore Builder Image Cache: copy-source'
- run:
command: make -C packages*.lock load-builder-cache
name: Load whatever builder cache we have (if any) into the Docker daemon
no_output_timeout: 30m
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06"
eval "$(ssh-agent -s)"
if [ -f "$KEYFILE" ]; then
ssh-add "$KEYFILE"
else
echo "==> INFO: SSH key for github.com not found"
echo " Attempts to access private repositories from within"
echo " the build will fail, e.g. for private go modules, or"
echo " attempts to directly clone private repositories."
fi
make -C packages*.lock package
name: Compile Package
- run:
command: ls -lahR .buildcache/packages
name: List packages
- save_cache:
key: package-d0c51e7a4f1026914af4a84e8f4845d8f3e8bb13-{{checksum ".buildcache/cache-keys/package-d0c51e7a4f1026914af4a84e8f4845d8f3e8bb13"}}
name: Save package cache
paths:
- .buildcache/packages/store
test-go-remote-docker:
docker:
- image: docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster
resource_class: medium
working_directory: /go/src/github.com/hashicorp/vault
parallelism: 8
steps:
- run:
command: |
# If the branch being tested starts with ui/ or docs/ we want to exit the job without failing
[[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* ]] && {
# stop the job from this step
circleci-agent step halt
}
# exit with success either way
exit 0
name: Check branch name
working_directory: ~/
- checkout
- setup_remote_docker:
docker_layer_caching: true
version: 18.09.3
- add_ssh_keys:
fingerprints:
- 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06
- run:
command: |
git config --global url."git@github.com:".insteadOf https://github.com/
- run:
command: |
TZ=GMT date '+%Y%m%d' > /tmp/go-cache-key
name: Compute test cache key
- restore_cache:
keys:
- go-test-cache-date-v1-{{ checksum "/tmp/go-cache-key" }}
- restore_cache:
keys:
- v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}}
name: Restore exact go modules cache
- run:
command: |
set -x
EXTRA_TAGS=
case "" in
*-race*) export VAULT_CI_GO_TEST_RACE=1;;
*) EXTRA_TAGS=deadlock;;
esac
# Install CircleCI CLI
curl -sSL \
"https://github.com/CircleCI-Public/circleci-cli/releases/download/v${CIRCLECI_CLI_VERSION}/circleci-cli_${CIRCLECI_CLI_VERSION}_linux_amd64.tar.gz" \
| sudo tar --overwrite -xz \
-C /usr/local/bin \
"circleci-cli_${CIRCLECI_CLI_VERSION}_linux_amd64/circleci"
USE_DOCKER=0
USE_DOCKER=1
# Split Go tests by prior test times. If use_docker is true, only run
# tests that depend on docker, otherwise only those that don't.
if [ $USE_DOCKER == 1 ]; then