|
71 | 71 | - C:\generic-worker\generic-worker-test-creds.cmd |
72 | 72 | - copy "%TASK_USER_CREDENTIALS%" "%CD%\next-task-user.json" |
73 | 73 | - 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v -race ./...' |
74 | | - - set GW_TESTS_RUN_AS_TASK_USER=true |
| 74 | + - set GW_TESTS_RUN_AS_CURRENT_USER=true |
75 | 75 | - 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v -race' |
76 | 76 | - ineffassign . |
77 | 77 | artifacts: |
@@ -148,8 +148,10 @@ tasks: |
148 | 148 | - set GORACE=history_size=7 |
149 | 149 | - C:\generic-worker\generic-worker-test-creds.cmd |
150 | 150 | - copy "%TASK_USER_CREDENTIALS%" "%CD%\next-task-user.json" |
| 151 | + # This env var is not set on Windows Server 2012 R2 CI tasks; we must set here since this worker type runs tasks from Z: drive |
| 152 | + - set GW_SKIP_Z_DRIVE_TESTS=true |
151 | 153 | - 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v ./...' |
152 | | - - set GW_TESTS_RUN_AS_TASK_USER=true |
| 154 | + - set GW_TESTS_RUN_AS_CURRENT_USER=true |
153 | 155 | - 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v' |
154 | 156 | - ineffassign . |
155 | 157 | artifacts: |
@@ -232,8 +234,10 @@ tasks: |
232 | 234 | - set GORACE=history_size=7 |
233 | 235 | - C:\generic-worker\generic-worker-test-creds.cmd |
234 | 236 | - copy "%TASK_USER_CREDENTIALS%" "%CD%\next-task-user.json" |
| 237 | + # This env var is not set on Windows Server 2012 R2 CI tasks; we must set here since this worker type runs tasks from Z: drive |
| 238 | + - set GW_SKIP_Z_DRIVE_TESTS=true |
235 | 239 | - 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v -race ./...' |
236 | | - - set GW_TESTS_RUN_AS_TASK_USER=true |
| 240 | + - set GW_TESTS_RUN_AS_CURRENT_USER=true |
237 | 241 | - 'go test -tags multiuser -timeout 45m -ldflags "-X github.com/taskcluster/generic-worker.revision=%revision%" -v -race' |
238 | 242 | - ineffassign . |
239 | 243 | artifacts: |
@@ -308,7 +312,7 @@ tasks: |
308 | 312 | go install -tags simple -v -ldflags "-X main.revision=$(git rev-parse HEAD)" ./... |
309 | 313 | # output of wc command can contain spaces on darwin, so no quotes around expression |
310 | 314 | test $(git status --porcelain | wc -l) == 0 |
311 | | - 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)" -race -v ./... |
| 315 | + 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 ./... |
312 | 316 | ineffassign . |
313 | 317 | artifacts: |
314 | 318 | - name: public/build/generic-worker-darwin-amd64 |
@@ -378,8 +382,8 @@ tasks: |
378 | 382 | # output of wc command can contain spaces on darwin, so no quotes around expression |
379 | 383 | test $(git status --porcelain | wc -l) == 0 |
380 | 384 | cp "${TASK_USER_CREDENTIALS}" next-task-user.json |
381 | | - 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)" -race -v ./... |
382 | | - GW_TESTS_RUN_AS_TASK_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)" -race -v |
| 385 | + 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 |
| 386 | + 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 ./... |
383 | 387 | ineffassign . |
384 | 388 | artifacts: |
385 | 389 | - name: public/build/generic-worker-darwin-amd64 |
@@ -469,6 +473,79 @@ tasks: |
469 | 473 | # format: tar.gz |
470 | 474 |
|
471 | 475 |
|
| 476 | + ########################################################## |
| 477 | + ############## Linux amd64 Multiuser Build ############### |
| 478 | + ########################################################## |
| 479 | + |
| 480 | + - provisionerId: pmoore-manual |
| 481 | + workerType: linux-amd64 |
| 482 | + metadata: |
| 483 | + name: "Build/test 64 bit generic-worker (multiuser engine) on Ubuntu 17.04 VM" |
| 484 | + description: "This builds the 64 bit linux version of generic-worker (multiuser engine)" |
| 485 | + owner: "{{ event.head.user.email }}" # the user who sent the pr/push e-mail will be inserted here |
| 486 | + source: "{{ event.head.repo.url }}" # the repo where the pr came from will be inserted here |
| 487 | + extra: |
| 488 | + github: |
| 489 | + # Events that will trigger this task |
| 490 | + events: |
| 491 | + - pull_request.opened |
| 492 | + - pull_request.synchronize |
| 493 | + - push |
| 494 | + scopes: |
| 495 | + - generic-worker:cache:generic-worker-checkout |
| 496 | + - secrets:get:repo:github.com/taskcluster/generic-worker |
| 497 | + payload: |
| 498 | + features: |
| 499 | + taskclusterProxy: |
| 500 | + true |
| 501 | + maxRunTime: 3600 |
| 502 | + command: |
| 503 | + - - /bin/bash |
| 504 | + - -vxec |
| 505 | + - | |
| 506 | + export CGO_ENABLED=0 |
| 507 | + export GOROOT="$(pwd)/go1.10.8/go" |
| 508 | + export GOPATH="$(pwd)/gopath1.10.8" |
| 509 | + export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}" |
| 510 | + go version |
| 511 | + go env |
| 512 | + 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 > ~/env_private.sh |
| 513 | + source ~/env_private.sh |
| 514 | + mkdir -p "${GOPATH}/src/github.com/taskcluster" |
| 515 | + cd "${GOPATH}/src/github.com/taskcluster" |
| 516 | + if [ ! -d generic-worker/.git ]; then rm -rf generic-worker; git clone '{{ event.head.repo.url }}' 'generic-worker'; fi |
| 517 | + cd 'generic-worker' |
| 518 | + git fetch '{{ event.head.repo.url }}' "+{{ event.head.ref }}:refs/heads/X${TASK_ID}" |
| 519 | + git checkout -f "X${TASK_ID}" |
| 520 | + git reset --hard '{{ event.head.sha }}' |
| 521 | + git clean -fdx |
| 522 | + git checkout -B tmp -t "X${TASK_ID}" |
| 523 | + go get -v -u github.com/taskcluster/livelog github.com/taskcluster/taskcluster-proxy github.com/gordonklaus/ineffassign |
| 524 | + cd gw-codegen |
| 525 | + go get -v |
| 526 | + cd .. |
| 527 | + go generate |
| 528 | + go install -tags multiuser -v -ldflags "-X main.revision=$(git rev-parse HEAD)" ./... |
| 529 | + test "$(git status --porcelain | wc -l)" == 0 |
| 530 | + # These lines should be enabled in bug 1499054: |
| 531 | + # 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 ./... |
| 532 | + # 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)" -race -v |
| 533 | + "${GOPATH}/bin/ineffassign" . |
| 534 | + artifacts: |
| 535 | + - name: public/build/generic-worker-linux-amd64 |
| 536 | + path: gopath1.10.8/bin/generic-worker |
| 537 | + expires: "{{ '2 weeks' | $fromNow }}" |
| 538 | + type: file |
| 539 | + mounts: |
| 540 | + - cacheName: generic-worker-checkout |
| 541 | + directory: gopath1.10.8/src |
| 542 | + - content: |
| 543 | + url: https://storage.googleapis.com/golang/go1.10.8.linux-amd64.tar.gz |
| 544 | + sha256: d8626fb6f9a3ab397d88c483b576be41fa81eefcec2fd18562c87626dbb3c39e |
| 545 | + directory: go1.10.8 |
| 546 | + format: tar.gz |
| 547 | + |
| 548 | + |
472 | 549 | ########################################################## |
473 | 550 | ################ Linux amd64 Simple Build ################ |
474 | 551 | ########################################################## |
@@ -505,7 +582,7 @@ tasks: |
505 | 582 | export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}" |
506 | 583 | go version |
507 | 584 | go env |
508 | | - 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 > ~/env_private.sh |
| 585 | + 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 > ~/env_private.sh |
509 | 586 | source ~/env_private.sh |
510 | 587 | mkdir -p "${GOPATH}/src/github.com/taskcluster" |
511 | 588 | cd "${GOPATH}/src/github.com/taskcluster" |
@@ -576,7 +653,7 @@ tasks: |
576 | 653 | export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}" |
577 | 654 | go version |
578 | 655 | go env |
579 | | - 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 > ~/env_private.sh |
| 656 | + 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 > ~/env_private.sh |
580 | 657 | source ~/env_private.sh |
581 | 658 | mkdir -p "${GOPATH}/src/github.com/taskcluster" |
582 | 659 | cd "${GOPATH}/src/github.com/taskcluster" |
|
0 commit comments