swarming_vm.go: Run "gcloud auth configure-docker" during setup (setup-script-linux.sh).

This should fix Docker-related errors on machines configured with the legacy setup scripts (i.e. configured without Ansible).

Example errors this CL should fix:

 - https://ci.chromium.org/raw/build/logs.chromium.org/skia/60686f022c7f2a11/+/annotations
 - https://ci.chromium.org/raw/build/logs.chromium.org/skia/606743f2438e7a11/+/annotations

I tested this CL as follows:

1. I created a machine with the original setup script.
2. I SSH'd into the machine and ran "docker pull gcr.io/skia-public/binary-size:v1". It failed due to missing permissions.
3. I created a machine with the updated setup script.
4. I ran the command from step 2 and confirmed that it worked.

Bug: skia:14074
Change-Id: I6885c88f15ee32d4320b5ba06a84e7b4c487014e
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/643440
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Leandro Lovisolo <lovisolo@google.com>
1 file changed
tree: cbd1473c5c777f3687236dc11bc9729e361d7a30
  1. am/
  2. android_ingest/
  3. android_stats/
  4. api/
  5. autoroll/
  6. bash/
  7. bazel/
  8. blamer/
  9. bugs-central/
  10. cd/
  11. cherrypick-watcher/
  12. cmd/
  13. codereview-watcher/
  14. codesize/
  15. comments/
  16. comp-ui/
  17. cq_watcher/
  18. ct/
  19. datahopper/
  20. debugger-app/
  21. demos/
  22. docker/
  23. docker_pushes_watcher/
  24. docs/
  25. docsyserver/
  26. ds/
  27. email/
  28. external/
  29. fiddlek/
  30. firestore/
  31. get_service_account/
  32. gitsync/
  33. go/
  34. gold-client/
  35. golden/
  36. infra/
  37. infra-sk/
  38. jsdoc/
  39. jsfiddle/
  40. k8s-checker/
  41. k8s-deployer/
  42. kube/
  43. leasing/
  44. licenses/
  45. machine/
  46. make/
  47. modules/
  48. named-fiddles/
  49. new_element/
  50. npm-audit-mirror/
  51. particles/
  52. perdiff/
  53. perf/
  54. periodic-trigger/
  55. proberk/
  56. promk/
  57. puppeteer-tests/
  58. sa-keys-checker/
  59. scrap/
  60. scripts/
  61. shaders/
  62. sk/
  63. skbug/
  64. skcq/
  65. skfe/
  66. skolo/
  67. skottie/
  68. static_server/
  69. status/
  70. task_driver/
  71. task_scheduler/
  72. test-service/
  73. third_party/
  74. tools/
  75. tree_status/
  76. trybot_updater/
  77. .bazelignore
  78. .bazelrc
  79. .bazelversion
  80. .eslintrc.js
  81. .gitattributes
  82. .gitignore
  83. .mocharc.json
  84. .npmrc
  85. .puppeteerrc.js
  86. .vpython
  87. BAZEL_CHEATSHEET.md
  88. BUILD.bazel
  89. build_infra_prod.sh
  90. cipd.ensure
  91. codereview.settings
  92. DATASTORE.md
  93. demopage.sh
  94. DEPS
  95. go.mod
  96. go.sum
  97. go_repositories.bzl
  98. karmatest.sh
  99. launch.md
  100. LICENSE
  101. Makefile
  102. OWNERS
  103. package-lock.json
  104. package.json
  105. PRESUBMIT.py
  106. PRIVACY_POLICY.md
  107. README.md
  108. STYLEGUIDE.md
  109. tools.go
  110. tsconfig.json
  111. whitespace.txt
  112. WORKSPACE
README.md

Skia-Buildbot Repository

This repo contains infrastructure code for Skia.

Getting the Source Code

The main source code repository is a Git repository hosted at https://skia.googlesource.com/buildbot.git. It is possible to check out this repository directly with git clone or via go get.

Using git clone allows you to work in whatever directory you want. You will still need to set GOPATH in order to build some apps (recommended to put this in a cache dir). E.g.:

$ cd ${WORKDIR}
$ git clone https://skia.googlesource.com/buildbot.git
$ export GOPATH=${HOME}/.cache/gopath/$(basename ${WORKDIR})
$ mkdir $GOPATH
$ cd buildbot

Install dependencies

Almost all applications are built with Bazel, and bazelisk is the recommended tool to ensure you have the right version of bazel installed:

go install github.com/bazelbuild/bazelisk@latest
go install github.com/bazelbuild/buildtools/buildifier@latest
go install github.com/kisielk/errcheck@latest
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/mikefarah/yq/v4@latest
go install go.chromium.org/luci/client/cmd/...@latest

Install other dependencies:

sudo apt-get install jq

Build ~everything

bazelisk build --config=mayberemote //...

Test everything

bazelisk test --config=mayberemote //...

Generated Code

To update generated code run the following in any directory:

go generate ./...

Running unit tests

Install Cloud SDK.

Use this command to run the presubmit tests:

./run_unittests --small