[fiddle] Switch over to using the scrap api client.

Bug: skia:11108
Change-Id: Id038c56c01ed534ece857133405acac99a4546c9
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/352980
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2 files changed
tree: 14961966dca54d2f16376b5f71734e3ed9784e5b
  1. am/
  2. android_ingest/
  3. android_stats/
  4. api/
  5. autoroll/
  6. bash/
  7. bazel/
  8. blamer/
  9. bugs-central/
  10. chromeextensions/
  11. codereview-watcher/
  12. comments/
  13. contestk/
  14. cq_watcher/
  15. ct/
  16. datahopper/
  17. debugger-app/
  18. demos/
  19. docker/
  20. docker_pushes_watcher/
  21. docs/
  22. docserverk/
  23. dot/
  24. ds/
  25. external/
  26. fiddlek/
  27. firestore/
  28. get_service_account/
  29. git_cookie_authdaemon/
  30. gitsync/
  31. go/
  32. gold-client/
  33. golden/
  34. hashtag/
  35. html-template-minifier/
  36. infra/
  37. infra-sk/
  38. jsdoc/
  39. jsfiddle/
  40. k8s-checker/
  41. kube/
  42. leasing/
  43. licenses/
  44. machine/
  45. make/
  46. modules/
  47. named-fiddles/
  48. new_element/
  49. particles/
  50. perdiff/
  51. perf/
  52. periodic-trigger/
  53. power/
  54. proberk/
  55. promk/
  56. pulld/
  57. puppeteer-tests/
  58. push/
  59. scrap/
  60. scripts/
  61. sk8s/
  62. skbug/
  63. skfe/
  64. skolo/
  65. skottie/
  66. status/
  67. task_driver/
  68. task_scheduler/
  69. tools/
  70. tree_status/
  71. trybot_updater/
  72. velero/
  73. .bazelignore
  74. .bazelrc
  75. .eslintrc.js
  76. .gitattributes
  77. .gitignore
  78. .mocharc.json
  79. BUILD.bazel
  80. build_infra_prod.sh
  81. cipd.ensure
  82. codereview.settings
  83. DATASTORE.md
  84. DEPS
  85. go.mod
  86. go.sum
  87. go_repositories.bzl
  88. launch.md
  89. LICENSE
  90. Makefile
  91. package-lock.json
  92. package.json
  93. PRESUBMIT.py
  94. PRIVACY_POLICY.md
  95. README.md
  96. run_unittests
  97. run_unittests.go
  98. STYLEGUIDE.md
  99. tools.go
  100. tsconfig.json
  101. whitespace.txt
  102. 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

Using go get will fetch the repository into your GOPATH directory along with all the Go dependencies. You will need to set GOPATH and GO111MODULE=on. E.g.:

$ export GOPATH=${WORKDIR}
$ export GO111MODULE=on
$ go get -u -t go.skia.org/infra/...
$ cd ${GOPATH}/src/go.skia.org/infra/

Note: go.skia.org is a custom import path and will only work if used like the examples here.

Install Node.js (not as root) and add the bin dir to your path. Optionally run npm install npm -g, as suggested by the npm getting started doc.

Install other dependencies:

$ sudo apt-get install python-django
$ go get -u github.com/kisielk/errcheck \
  golang.org/x/tools/cmd/goimports \
  go.chromium.org/luci/client/cmd/isolate

Build ~everything:

$ make all

Generated Code

Some code is generated using go generate with external binaries. First, install the version of protoc referenced in the asset creation script and ensure it is on your PATH before other versions of protoc.

Install the necessary go packages:

$ go get -u \
  github.com/golang/protobuf/protoc-gen-go \
  golang.org/x/tools/cmd/stringer \
  google.golang.org/grpc \

Get mockery and add it to your PATH.

To generate code run in this directory:

$ go generate ./...

Running unit tests

Install Cloud SDK.

Use this command to run the presubmit tests:

$ ./run_unittests --small