forked from taskcluster/generic-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.taskcluster.yml
784 lines (752 loc) · 36.1 KB
/
.taskcluster.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
# The version is always required
version: 0
allowPullRequests: public
# Top level metadata is always required
metadata:
name: "Taskcluster Generic Worker Tests"
description: "These tests should ensure that any new commits against generic worker codebase are tested across all supported worker types in gekco."
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
tasks:
##########################################################
######### Windows Server 2012 R2 Multiuser Build #########
##########################################################
- provisionerId: pmoore-test
workerType: win2012r2-cu
metadata:
name: "Build/test 64 bit generic-worker (multiuser engine) on Windows Server 2012 R2"
description: "This builds and tests the 64 bit Windows version of generic-worker (multiuser engine) on Windows Server 2012 R2"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- pull_request.opened
- pull_request.synchronize
- push
scopes:
- generic-worker:cache:generic-worker-checkout
- secrets:get:repo:github.com/taskcluster/generic-worker
payload:
features:
taskclusterProxy: true
maxRunTime: 3600
command:
- >-
C:\cygwin\bin\wget.exe -q -O-
%TASKCLUSTER_PROXY_URL%/secrets/v1/secret/repo:github.com/taskcluster/generic-worker
| C:\cygwin\bin\sed.exe -n 's/.*"b64_encoded_credentials_batch_script":
"\(.*\)".*/\1/p' | C:\cygwin\bin\base64.exe -d > tc-creds.bat
- call tc-creds.bat 2>&1
- set CGO_ENABLED=0
- set GOPATH=%CD%\gopath1.10.8
- set GOROOT=%CD%\go1.10.8\go
- set PATH=%CD%\git\cmd;%GOPATH%\bin;%GOROOT%\bin;%PATH%
- git config --global core.autocrlf false
- go version
- go env
- 'if not exist "%GOPATH%\src\github.com\taskcluster" mkdir "%GOPATH%\src\github.com\taskcluster"'
- 'cd "%GOPATH%\src\github.com\taskcluster"'
- 'if not exist generic-worker git clone {{ event.head.repo.url }} generic-worker'
- 'cd generic-worker'
- 'git fetch "{{ event.head.repo.url }}" "+{{ event.head.ref }}:refs/heads/X%TASK_ID%"'
- 'git checkout -f "X%TASK_ID%"'
- 'git reset --hard "{{ event.head.sha }}"'
- 'git clean -fdx'
- 'git checkout -B tmp -t "X%TASK_ID%"'
- go get -v -u github.com/taskcluster/livelog github.com/taskcluster/taskcluster-proxy github.com/gordonklaus/ineffassign
- cd gw-codegen
- go get -v
- cd ..
- go generate
- |
:: this counts the number of lines returned by git status
:: dump temp file a directory higher, otherwise git status reports the tmp1.txt file!
git status --porcelain | C:\Windows\System32\find.exe /v /c "" > ..\tmp1.txt
set /P lines=<..\tmp1.txt
:: this checks that if more than 0 lines are returned, we fail
if %lines% gtr 0 exit /b 64
:: find.exe will have exited with exit code 1, so need to explicitly exit with 0
exit /b 0
- git rev-parse HEAD > revision.txt
- set /p revision=< revision.txt
- go install -tags multiuser -v -ldflags "-X main.revision=%revision%" ./...
- set CGO_ENABLED=1
- set GORACE=history_size=7
- copy "%TASK_USER_CREDENTIALS%" "%CD%\next-task-user.json"
# We must set here since this worker does not have a Z: drive
- set GW_SKIP_Z_DRIVE_TESTS=true
- 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v -race ./...'
- set GW_TESTS_RUN_AS_CURRENT_USER=true
- 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v -race'
- ineffassign .
artifacts:
- name: public/build/generic-worker-windows-amd64.exe
path: gopath1.10.8\bin\generic-worker.exe
expires: "{{ '2 weeks' | $fromNow }}"
type: file
mounts:
- cacheName: generic-worker-checkout
directory: gopath1.10.8\src
- content:
url: https://storage.googleapis.com/golang/go1.10.8.windows-amd64.zip
sha256: ab63b55c349f75cce4b93aefa9b52828f50ebafb302da5057db0e686d7873d7a
directory: go1.10.8
format: zip
- content:
url: https://github.com/git-for-windows/git/releases/download/v2.14.1.windows.1/MinGit-2.14.1-64-bit.zip
sha256: 65c12e4959b8874187b68ec37e532fe7fc526e10f6f0f29e699fa1d2449e7d92
directory: git
format: zip
##########################################################
############### Windows 7 Multiuser Build ################
##########################################################
- provisionerId: aws-provisioner-v1
workerType: gecko-t-win7-32-cu
metadata:
name: "Build/test 32 bit generic-worker (multiuser engine) on Windows 7"
description: "This builds and tests the 32 bit Windows version of generic-worker (multiuser engine) on Windows 7"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- pull_request.opened
- pull_request.synchronize
- push
scopes:
- generic-worker:cache:generic-worker-checkout
- secrets:get:repo:github.com/taskcluster/generic-worker
payload:
features:
taskclusterProxy: true
maxRunTime: 3600
env:
# Python 2 is needed for TestDesktopResizeAndMovePointer
# Powershell is needed for TestMounts
# System32 is needed for e.g. cmd.exe, icacls.exe, ...
PATH: C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0;C:\mozilla-build\python
command:
- >-
C:\mozilla-build\wget\wget.exe -q -O-
%TASKCLUSTER_PROXY_URL%/secrets/v1/secret/repo:github.com/taskcluster/generic-worker
| C:\mozilla-build\msys\bin\sed.exe -n
's/.*"b64_encoded_credentials_batch_script": "\(.*\)".*/\1/p' > tc-creds.bat.b64
- certutil -decode tc-creds.bat.b64 tc-creds.bat
- call tc-creds.bat 2>&1
- set CGO_ENABLED=0
- set GOPATH=%CD%\gopath1.10.8
- set GOROOT=%CD%\go1.10.8\go
- set PATH=%CD%\git\bin;%GOPATH%\bin;%GOROOT%\bin;%PATH%
- git config --global core.autocrlf false
- go version
- go env
- 'if not exist "%GOPATH%\src\github.com\taskcluster" mkdir "%GOPATH%\src\github.com\taskcluster"'
- 'cd "%GOPATH%\src\github.com\taskcluster"'
- 'if not exist generic-worker git clone {{ event.head.repo.url }} generic-worker'
- 'cd generic-worker'
- 'git fetch "{{ event.head.repo.url }}" "+{{ event.head.ref }}:refs/heads/X%TASK_ID%"'
- 'git checkout -f "X%TASK_ID%"'
- 'git reset --hard "{{ event.head.sha }}"'
- 'git clean -fdx'
- 'git checkout -B tmp -t "X%TASK_ID%"'
- go get -v -u github.com/taskcluster/livelog github.com/taskcluster/taskcluster-proxy github.com/gordonklaus/ineffassign
- cd gw-codegen
- go get -v
- cd ..
- go generate
- set revision={{ event.head.sha }}
- go install -tags multiuser -v -ldflags "-X main.revision=%revision%" ./...
- set GORACE=history_size=7
- copy "%TASK_USER_CREDENTIALS%" "%CD%\next-task-user.json"
# We must set here since this worker type runs tasks from Z: drive
- set GW_SKIP_Z_DRIVE_TESTS=true
- 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v ./...'
- set GW_TESTS_RUN_AS_CURRENT_USER=true
- 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v'
- ineffassign .
artifacts:
- name: public/build/generic-worker-windows-386.exe
path: gopath1.10.8\bin\generic-worker.exe
expires: "{{ '2 weeks' | $fromNow }}"
type: file
mounts:
- cacheName: generic-worker-checkout
directory: gopath1.10.8\src
- content:
url: https://storage.googleapis.com/golang/go1.10.8.windows-386.zip
sha256: 9ded97d830bef3734ea6de70df0159656d6a63e01484175b34d72b8db326bda0
directory: go1.10.8
format: zip
- content:
url: https://github.com/git-for-windows/git/releases/download/v2.11.0.windows.3/Git-2.11.0.3-32-bit.tar.bz2
sha256: 0f0e2f78fc9b91d6c860eb7de742f3601b0ccd13c5c61444c7cf55b00bcb4ed4
directory: git
format: tar.bz2
##########################################################
############### Windows 10 Multiuser Build ###############
##########################################################
- provisionerId: aws-provisioner-v1
workerType: gecko-t-win10-64-cu
metadata:
name: "Build/test 64 bit generic-worker (multiuser engine) on Windows 10"
description: "This builds and tests the 64 bit Windows version of generic-worker (multiuser engine) on Windows 10"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- pull_request.opened
- pull_request.synchronize
- push
scopes:
- generic-worker:cache:generic-worker-checkout
- secrets:get:repo:github.com/taskcluster/generic-worker
payload:
features:
taskclusterProxy: true
maxRunTime: 3600
command:
- >-
C:\mozilla-build\bin\wget.exe -q -O-
%TASKCLUSTER_PROXY_URL%/secrets/v1/secret/repo:github.com/taskcluster/generic-worker
| C:\mozilla-build\msys\bin\sed.exe -n
's/.*"b64_encoded_credentials_batch_script": "\(.*\)".*/\1/p' > tc-creds.bat.b64
- certutil -decode tc-creds.bat.b64 tc-creds.bat
- call tc-creds.bat 2>&1
- set CGO_ENABLED=0
- set GOPATH=%CD%\gopath1.10.8
- set GOROOT=%CD%\go1.10.8\go
- set PATH=%CD%\git\cmd;%GOPATH%\bin;%GOROOT%\bin;%PATH%
- git config --global core.autocrlf false
- go version
- go env
- 'if not exist "%GOPATH%\src\github.com\taskcluster" mkdir "%GOPATH%\src\github.com\taskcluster"'
- 'cd "%GOPATH%\src\github.com\taskcluster"'
- 'if not exist generic-worker git clone {{ event.head.repo.url }} generic-worker'
- 'cd generic-worker'
- 'git fetch "{{ event.head.repo.url }}" "+{{ event.head.ref }}:refs/heads/X%TASK_ID%"'
- 'git checkout -f "X%TASK_ID%"'
- 'git reset --hard "{{ event.head.sha }}"'
- 'git clean -fdx'
- 'git checkout -B tmp -t "X%TASK_ID%"'
- go get -v -u github.com/taskcluster/livelog github.com/taskcluster/taskcluster-proxy github.com/gordonklaus/ineffassign
- cd gw-codegen
- go get -v
- cd ..
- go generate
- |
:: this counts the number of lines returned by git status
:: dump temp file a directory higher, otherwise git status reports the tmp1.txt file!
git status --porcelain | C:\Windows\System32\find.exe /v /c "" > ..\tmp1.txt
set /P lines=<..\tmp1.txt
:: this checks that if more than 0 lines are returned, we fail
if %lines% gtr 0 exit /b 64
:: find.exe will have exited with exit code 1, so need to explicitly exit with 0
exit /b 0
- git rev-parse HEAD > revision.txt
- set /p revision=< revision.txt
- go install -tags multiuser -v -ldflags "-X main.revision=%revision%" ./...
- set CGO_ENABLED=1
- set GORACE=history_size=7
- copy "%TASK_USER_CREDENTIALS%" "%CD%\next-task-user.json"
# We must set here since this worker type runs tasks from Z: drive
- set GW_SKIP_Z_DRIVE_TESTS=true
- 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v -race ./...'
- set GW_TESTS_RUN_AS_CURRENT_USER=true
- 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v -race'
- ineffassign .
artifacts:
- name: public/build/generic-worker-windows-amd64.exe
path: gopath1.10.8\bin\generic-worker.exe
expires: "{{ '2 weeks' | $fromNow }}"
type: file
mounts:
- cacheName: generic-worker-checkout
directory: gopath1.10.8\src
- content:
url: https://storage.googleapis.com/golang/go1.10.8.windows-amd64.zip
sha256: ab63b55c349f75cce4b93aefa9b52828f50ebafb302da5057db0e686d7873d7a
directory: go1.10.8
format: zip
- content:
url: https://github.com/git-for-windows/git/releases/download/v2.14.1.windows.1/MinGit-2.14.1-64-bit.zip
sha256: 65c12e4959b8874187b68ec37e532fe7fc526e10f6f0f29e699fa1d2449e7d92
directory: git
format: zip
##########################################################
############ macOS Mojave 10.14 Simple Build #############
##########################################################
- provisionerId: pmoore-manual
workerType: mac-os-x
metadata:
name: "Build/test 64 bit generic-worker (simple engine) on macOS Mojave 10.14"
description: "This builds the 64 bit macOS version of generic-worker (simple engine)"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- pull_request.opened
- pull_request.synchronize
- push
scopes:
- generic-worker:cache:generic-worker-checkout
- secrets:get:repo:github.com/taskcluster/generic-worker
payload:
features:
taskclusterProxy: true
maxRunTime: 3600
env:
command:
- - /bin/bash
- -vxec
- |
export CGO_ENABLED=0
export GOROOT="$(pwd)/go1.10.8/go"
export GOPATH="$(pwd)/gopath1.10.8"
export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"
go version
go env
curl -s "${TASKCLUSTER_PROXY_URL}/secrets/v1/secret/repo:github.com/taskcluster/generic-worker" | sed -n 's/.*"b64_encoded_credentials_script": "\(.*\)".*/\1/p' | base64 -D > tc-creds.sh
source tc-creds.sh
mkdir -p "${GOPATH}/src/github.com/taskcluster"
cd "${GOPATH}/src/github.com/taskcluster"
if [ ! -d generic-worker/.git ]; then rm -rf generic-worker; git clone '{{ event.head.repo.url }}' 'generic-worker'; fi
cd 'generic-worker'
git fetch '{{ event.head.repo.url }}' "+{{ event.head.ref }}:refs/heads/X${TASK_ID}"
git checkout -f "X${TASK_ID}"
git reset --hard '{{ event.head.sha }}'
git clean -fdx
git checkout -B tmp -t "X${TASK_ID}"
go get -v -u github.com/taskcluster/livelog github.com/taskcluster/taskcluster-proxy github.com/gordonklaus/ineffassign
cd gw-codegen
go get -v
cd ..
go generate
go install -tags simple -v -ldflags "-X main.revision=$(git rev-parse HEAD)" ./...
# output of wc command can contain spaces on darwin, so no quotes around expression
test $(git status --porcelain | wc -l) == 0
GORACE=history_size=7 CGO_ENABLED=1 go test -tags simple -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=$(git rev-parse HEAD)" -v -race ./...
ineffassign .
artifacts:
- name: public/build/generic-worker-darwin-amd64
path: gopath1.10.8/bin/generic-worker
expires: "{{ '2 weeks' | $fromNow }}"
type: file
mounts:
# - cacheName: generic-worker-checkout
# directory: gopath1.10.8/src
- content:
url: https://storage.googleapis.com/golang/go1.10.8.darwin-amd64.tar.gz
sha256: f41bc914a721ac98a187df824b3b40f0a7f35bfb3c6d31221bdd940d537d3c28
directory: go1.10.8
format: tar.gz
##########################################################
########### macOS Mojave 10.14 Multiuser Build ###########
##########################################################
- provisionerId: pmoore-manual
workerType: mac-os-x
metadata:
name: "Build/test 64 bit generic-worker (multiuser engine) on macOS Mojave 10.14"
description: "This builds the 64 bit macOS version of generic-worker (multiuser engine)"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- pull_request.opened
- pull_request.synchronize
- push
scopes:
- generic-worker:cache:generic-worker-checkout
- secrets:get:repo:github.com/taskcluster/generic-worker
payload:
features:
taskclusterProxy: true
maxRunTime: 3600
env:
command:
- - /bin/bash
- -vxec
- |
export CGO_ENABLED=0
export GOROOT="$(pwd)/go1.10.8/go"
export GOPATH="$(pwd)/gopath1.10.8"
export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"
go version
go env
curl -s "${TASKCLUSTER_PROXY_URL}/secrets/v1/secret/repo:github.com/taskcluster/generic-worker" | sed -n 's/.*"b64_encoded_credentials_script": "\(.*\)".*/\1/p' | base64 -D > tc-creds.sh
source tc-creds.sh
mkdir -p "${GOPATH}/src/github.com/taskcluster"
cd "${GOPATH}/src/github.com/taskcluster"
if [ ! -d generic-worker/.git ]; then rm -rf generic-worker; git clone '{{ event.head.repo.url }}' 'generic-worker'; fi
cd 'generic-worker'
git fetch '{{ event.head.repo.url }}' "+{{ event.head.ref }}:refs/heads/X${TASK_ID}"
git checkout -f "X${TASK_ID}"
git reset --hard '{{ event.head.sha }}'
git clean -fdx
git checkout -B tmp -t "X${TASK_ID}"
go get -v -u github.com/taskcluster/livelog github.com/taskcluster/taskcluster-proxy github.com/gordonklaus/ineffassign
cd gw-codegen
go get -v
cd ..
go generate
go install -tags multiuser -v -ldflags "-X main.revision=$(git rev-parse HEAD)" ./...
# output of wc command can contain spaces on darwin, so no quotes around expression
test $(git status --porcelain | wc -l) == 0
cp "${TASK_USER_CREDENTIALS}" next-task-user.json
# IMPORTANT - run go test with GW_TESTS_RUN_AS_CURRENT_USER=true *before* running it without
# otherwise tests that call `go run ....` will write go object files to .cache as root
GW_TESTS_RUN_AS_CURRENT_USER=true GORACE=history_size=7 CGO_ENABLED=1 go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=$(git rev-parse HEAD)" -v -race
GORACE=history_size=7 CGO_ENABLED=1 go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=$(git rev-parse HEAD)" -v -race ./...
ineffassign .
artifacts:
- name: public/build/generic-worker-darwin-amd64
path: gopath1.10.8/bin/generic-worker
expires: "{{ '2 weeks' | $fromNow }}"
type: file
mounts:
# - cacheName: generic-worker-checkout
# directory: gopath1.10.8/src
- content:
url: https://storage.googleapis.com/golang/go1.10.8.darwin-amd64.tar.gz
sha256: f41bc914a721ac98a187df824b3b40f0a7f35bfb3c6d31221bdd940d537d3c28
directory: go1.10.8
format: tar.gz
##########################################################
################ Linux ARM6 Simple Build #################
##########################################################
##########################################################
# Currently Raspberry PI is not available (being used for other things)
# Will reenable when I have it back again
##########################################################
# - provisionerId: pmoore-manual
# workerType: raspberry-pi-3b
# metadata:
# name: "Build/test ARM6 generic-worker (simple engine) on Linux (Raspberry Pi)"
# description: "This builds the ARM6 Linux version of generic-worker (simple engine)"
# owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
# source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
# extra:
# github:
# # Events that will trigger this task
# events:
# - pull_request.opened
# - pull_request.synchronize
# - push
# scopes:
# - generic-worker:cache:generic-worker-checkout
# - secrets:get:repo:github.com/taskcluster/generic-worker
# payload:
# features:
# taskclusterProxy: true
# maxRunTime: 3600
# command:
# - - /bin/bash
# - -vxec
# - |
# export CGO_ENABLED=0
# export GOROOT="$(pwd)/go1.10.8/go"
# export GOPATH="$(pwd)/gopath1.10.8"
# export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"
# export CGO_ENABLED=0
# go version
# go env
# curl -s "${TASKCLUSTER_PROXY_URL}/secrets/v1/secret/repo:github.com/taskcluster/generic-worker" | sed -n 's/.*"b64_encoded_credentials_script": "\(.*\)".*/\1/p' | base64 -d > tc-creds.sh
# source tc-creds.sh
# mkdir -p "${GOPATH}/src/github.com/taskcluster"
# cd "${GOPATH}/src/github.com/taskcluster"
# if [ ! -d generic-worker/.git ]; then rm -rf generic-worker; git clone '{{ event.head.repo.url }}' 'generic-worker'; fi
# cd 'generic-worker'
# git fetch '{{ event.head.repo.url }}' "+{{ event.head.ref }}:refs/heads/X${TASK_ID}"
# git checkout -f "X${TASK_ID}"
# git reset --hard '{{ event.head.sha }}'
# git clean -fdx
# git checkout -B tmp -t "X${TASK_ID}"
# go get -v -u github.com/taskcluster/livelog github.com/taskcluster/taskcluster-proxy github.com/gordonklaus/ineffassign
# cd gw-codegen
# go get -v
# cd ..
# go generate
# go install -tags simple -v -ldflags "-X main.revision=$(git rev-parse HEAD)" ./...
# test "$(git status --porcelain | wc -l)" == 0
# GORACE=history_size=7 go test -tags simple -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=$(git rev-parse HEAD)" -v ./...
# ineffassign .
# artifacts:
# - name: public/build/generic-worker-linux-armv6l
# path: gopath1.10.8/bin/generic-worker
# expires: "{{ '2 weeks' | $fromNow }}"
# type: file
# mounts:
## - cacheName: generic-worker-checkout
## directory: gopath1.10.8/src
# - content:
# url: https://storage.googleapis.com/golang/go1.10.8.linux-armv6l.tar.gz
# sha256: 6fdbc67524fc4c15fc87014869dddce9ecda7958b78f3cb1bbc5b0a9b61bfb95
# directory: go1.10.8
# format: tar.gz
##########################################################
############## Linux amd64 Multiuser Build ###############
##########################################################
- provisionerId: aws-provisioner-v1
workerType: gwci-linux
metadata:
name: "Build/test 64 bit generic-worker (multiuser engine) on Ubuntu 17.04 VM"
description: "This builds the 64 bit linux version of generic-worker (multiuser engine)"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- pull_request.opened
- pull_request.synchronize
- push
scopes:
- generic-worker:cache:generic-worker-checkout
- secrets:get:repo:github.com/taskcluster/generic-worker
payload:
features:
taskclusterProxy:
true
maxRunTime: 3600
command:
- - /bin/bash
- -vxec
- |
export CGO_ENABLED=0
export GOROOT="$(pwd)/go1.10.8/go"
export GOPATH="$(pwd)/gopath1.10.8"
export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"
go version
go env
curl -s "${TASKCLUSTER_PROXY_URL}/secrets/v1/secret/repo:github.com/taskcluster/generic-worker" | sed -n 's/.*"b64_encoded_credentials_script": "\(.*\)".*/\1/p' | base64 -d > tc-creds.sh
source tc-creds.sh
mkdir -p "${GOPATH}/src/github.com/taskcluster"
cd "${GOPATH}/src/github.com/taskcluster"
if [ ! -d generic-worker/.git ]; then rm -rf generic-worker; git clone '{{ event.head.repo.url }}' 'generic-worker'; fi
cd 'generic-worker'
git fetch '{{ event.head.repo.url }}' "+{{ event.head.ref }}:refs/heads/X${TASK_ID}"
git checkout -f "X${TASK_ID}"
git reset --hard '{{ event.head.sha }}'
git clean -fdx
git checkout -B tmp -t "X${TASK_ID}"
go get -v -u github.com/taskcluster/livelog github.com/taskcluster/taskcluster-proxy github.com/gordonklaus/ineffassign
cd gw-codegen
go get -v
cd ..
go generate
go install -tags multiuser -v -ldflags "-X main.revision=$(git rev-parse HEAD)" ./...
test "$(git status --porcelain | wc -l)" == 0
cp "${TASK_USER_CREDENTIALS}" next-task-user.json
# IMPORTANT - run go test with GW_TESTS_RUN_AS_CURRENT_USER=true *before* running it without
# otherwise tests that call `go run ....` will write go object files to .cache as root
GW_TESTS_RUN_AS_CURRENT_USER=true GORACE=history_size=7 CGO_ENABLED=1 go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=$(git rev-parse HEAD)" -v -race
GORACE=history_size=7 CGO_ENABLED=1 go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=$(git rev-parse HEAD)" -v -race ./...
"${GOPATH}/bin/ineffassign" .
artifacts:
- name: public/build/generic-worker-linux-amd64
path: gopath1.10.8/bin/generic-worker
expires: "{{ '2 weeks' | $fromNow }}"
type: file
mounts:
# - cacheName: generic-worker-checkout
# directory: gopath1.10.8/src
- content:
url: https://storage.googleapis.com/golang/go1.10.8.linux-amd64.tar.gz
sha256: d8626fb6f9a3ab397d88c483b576be41fa81eefcec2fd18562c87626dbb3c39e
directory: go1.10.8
format: tar.gz
##########################################################
################ Linux amd64 Simple Build ################
##########################################################
- provisionerId: aws-provisioner-v1
workerType: gwci-linux
metadata:
name: "Build/test 64 bit generic-worker (simple engine) on Ubuntu 17.04 VM"
description: "This builds the 64 bit linux version of generic-worker (simple engine)"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- pull_request.opened
- pull_request.synchronize
- push
scopes:
- generic-worker:cache:generic-worker-checkout
- secrets:get:repo:github.com/taskcluster/generic-worker
payload:
features:
taskclusterProxy:
true
maxRunTime: 3600
command:
- - /bin/bash
- -vxec
- |
export CGO_ENABLED=0
export GOROOT="$(pwd)/go1.10.8/go"
export GOPATH="$(pwd)/gopath1.10.8"
export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"
go version
go env
wget -q -O- "${TASKCLUSTER_PROXY_URL}/secrets/v1/secret/repo:github.com/taskcluster/generic-worker" | sed -n 's/.*"b64_encoded_credentials_script": "\(.*\)".*/\1/p' | base64 -d > tc-creds.sh
source tc-creds.sh
mkdir -p "${GOPATH}/src/github.com/taskcluster"
cd "${GOPATH}/src/github.com/taskcluster"
if [ ! -d generic-worker/.git ]; then rm -rf generic-worker; git clone '{{ event.head.repo.url }}' 'generic-worker'; fi
cd 'generic-worker'
git fetch '{{ event.head.repo.url }}' "+{{ event.head.ref }}:refs/heads/X${TASK_ID}"
git checkout -f "X${TASK_ID}"
git reset --hard '{{ event.head.sha }}'
git clean -fdx
git checkout -B tmp -t "X${TASK_ID}"
go get -v -u github.com/taskcluster/livelog github.com/taskcluster/taskcluster-proxy github.com/gordonklaus/ineffassign
cd gw-codegen
go get -v
cd ..
go generate
go install -tags simple -v -ldflags "-X main.revision=$(git rev-parse HEAD)" ./...
test "$(git status --porcelain | wc -l)" == 0
GORACE=history_size=7 CGO_ENABLED=1 go test -tags simple -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=$(git rev-parse HEAD)" -v -race ./...
"${GOPATH}/bin/ineffassign" .
artifacts:
- name: public/build/generic-worker-linux-amd64
path: gopath1.10.8/bin/generic-worker
expires: "{{ '2 weeks' | $fromNow }}"
type: file
mounts:
# - cacheName: generic-worker-checkout
# directory: gopath1.10.8/src
- content:
url: https://storage.googleapis.com/golang/go1.10.8.linux-amd64.tar.gz
sha256: d8626fb6f9a3ab397d88c483b576be41fa81eefcec2fd18562c87626dbb3c39e
directory: go1.10.8
format: tar.gz
##########################################################
################ Linux amd64 Docker Build ################
##########################################################
- provisionerId: aws-provisioner-v1
workerType: gwci-linux
metadata:
name: "Build/test 64 bit generic-worker (docker engine) on Ubuntu 17.04 VM"
description: "This builds the 64 bit linux version of generic-worker (docker engine)"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- pull_request.opened
- pull_request.synchronize
- push
scopes:
- generic-worker:cache:generic-worker-checkout
- secrets:get:repo:github.com/taskcluster/generic-worker
payload:
features:
taskclusterProxy:
true
maxRunTime: 3600
command:
- - /bin/bash
- -vxec
- |
export CGO_ENABLED=0
export GOROOT="$(pwd)/go1.10.8/go"
export GOPATH="$(pwd)/gopath1.10.8"
export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"
go version
go env
wget -q -O- "${TASKCLUSTER_PROXY_URL}/secrets/v1/secret/repo:github.com/taskcluster/generic-worker" | sed -n 's/.*"b64_encoded_credentials_script": "\(.*\)".*/\1/p' | base64 -d > tc-creds.sh
source tc-creds.sh
mkdir -p "${GOPATH}/src/github.com/taskcluster"
cd "${GOPATH}/src/github.com/taskcluster"
if [ ! -d generic-worker/.git ]; then rm -rf generic-worker; git clone '{{ event.head.repo.url }}' 'generic-worker'; fi
cd 'generic-worker'
git fetch '{{ event.head.repo.url }}' "+{{ event.head.ref }}:refs/heads/X${TASK_ID}"
git checkout -f "X${TASK_ID}"
git reset --hard '{{ event.head.sha }}'
git clean -fdx
git checkout -B tmp -t "X${TASK_ID}"
go get -v -u github.com/taskcluster/livelog github.com/taskcluster/taskcluster-proxy github.com/gordonklaus/ineffassign
cd gw-codegen
go get -v
cd ..
go generate
go install -tags docker -v -ldflags "-X main.revision=$(git rev-parse HEAD)" ./...
test "$(git status --porcelain | wc -l)" == 0
GORACE=history_size=7 CGO_ENABLED=1 go test -tags docker -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=$(git rev-parse HEAD)" -v -race ./...
"${GOPATH}/bin/ineffassign" .
artifacts:
- name: public/build/generic-worker-linux-amd64
path: gopath1.10.8/bin/generic-worker
expires: "{{ '2 weeks' | $fromNow }}"
type: file
mounts:
# - cacheName: generic-worker-checkout
# directory: gopath1.10.8/src
- content:
url: https://storage.googleapis.com/golang/go1.10.8.linux-amd64.tar.gz
sha256: d8626fb6f9a3ab397d88c483b576be41fa81eefcec2fd18562c87626dbb3c39e
directory: go1.10.8
format: tar.gz
##########################################################
############## Check vendored dependencies ###############
##########################################################
- provisionerId: aws-provisioner-v1
workerType: gwci-linux
metadata:
name: "Run 'dep check' to ensure dependencies are up to date"
description: "Run 'dep check' to ensure dependencies are up to date"
owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here
source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here
extra:
github:
# Events that will trigger this task
events:
- pull_request.opened
- pull_request.synchronize
- push
scopes:
- generic-worker:cache:generic-worker-checkout
payload:
maxRunTime: 3600
command:
- - /bin/bash
- -vxec
- |
export CGO_ENABLED=0
export GOROOT="$(pwd)/go1.10.8/go"
export GOPATH="$(pwd)/gopath1.10.8"
export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"
go version
go env
mkdir -p "${GOPATH}/src/github.com/taskcluster"
cd "${GOPATH}/src/github.com/taskcluster"
if [ ! -d generic-worker/.git ]; then rm -rf generic-worker; git clone '{{ event.head.repo.url }}' 'generic-worker'; fi
cd 'generic-worker'
git fetch '{{ event.head.repo.url }}' "+{{ event.head.ref }}:refs/heads/X${TASK_ID}"
git checkout -f "X${TASK_ID}"
git reset --hard '{{ event.head.sha }}'
git clean -fdx
git checkout -B tmp -t "X${TASK_ID}"
mkdir -p "${GOPATH}/bin"
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep check
mounts:
# - cacheName: generic-worker-checkout
# directory: gopath1.10.8/src
- content:
url: https://storage.googleapis.com/golang/go1.10.8.linux-amd64.tar.gz
sha256: d8626fb6f9a3ab397d88c483b576be41fa81eefcec2fd18562c87626dbb3c39e
directory: go1.10.8
format: tar.gz