Do not use pkg_tars again in skia_app_container if run_commands_root or
run_commands_skia is specified

This bug had 2 effects:
* Any changes to directories in pkg_tars by run_commands_root and
  run_commands_skia were overriden.
* Files/directories moved out of pkg_tars still existed causing slow
  builds of certain apps.

Bug: skia:12816
Change-Id: I2d9b7bff938f6f3bc3233aea9b28b81186509bc2
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/494856
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
1 file changed
tree: 03ef8cf5d332b6ef8c10f6677046853b0a46a2da
  1. am/
  2. android_ingest/
  3. android_stats/
  4. api/
  5. autoroll/
  6. bash/
  7. bazel/
  8. blamer/
  9. bugs-central/
  10. codereview-watcher/
  11. codesize/
  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. docsyserver/
  23. dot/
  24. ds/
  25. external/
  26. fiddlek/
  27. firestore/
  28. get_service_account/
  29. gitsync/
  30. go/
  31. gold-client/
  32. golden/
  33. hashtag/
  34. infra-sk/
  35. infra/
  36. jsdoc/
  37. jsfiddle/
  38. k8s-checker/
  39. kube/
  40. leasing/
  41. licenses/
  42. machine/
  43. make/
  44. modules/
  45. named-fiddles/
  46. new_element/
  47. particles/
  48. perdiff/
  49. perf/
  50. periodic-trigger/
  51. proberk/
  52. promk/
  53. puppeteer-tests/
  54. sa-keys-checker/
  55. scrap/
  56. scripts/
  57. shaders/
  58. sk/
  59. skbug/
  60. skcq/
  61. skfe/
  62. skolo/
  63. skottie/
  64. status/
  65. switchboard/
  66. task_driver/
  67. task_scheduler/
  68. third_party/
  69. tools/
  70. tree_status/
  71. trybot_updater/
  72. velero/
  73. .bazelignore
  74. .bazelrc
  75. .bazelversion
  76. .eslintrc.js
  77. .gitattributes
  78. .gitignore
  79. .mocharc.json
  80. .vpython
  81. BAZEL_CHEATSHEET.md
  82. BUILD.bazel
  83. DATASTORE.md
  84. DEPS
  85. LICENSE
  86. Makefile
  87. OWNERS
  88. PRESUBMIT.py
  89. PRIVACY_POLICY.md
  90. README.md
  91. STYLEGUIDE.md
  92. WORKSPACE
  93. build_infra_prod.sh
  94. cipd.ensure
  95. codereview.settings
  96. demopage.sh
  97. elements-sk-scss.bzl
  98. go.mod
  99. go.sum
  100. go_repositories.bzl
  101. launch.md
  102. package-lock.json
  103. package.json
  104. run_unittests
  105. run_unittests.go
  106. tools.go
  107. tsconfig.json
  108. whitespace.txt
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 \
    jq \
    python-django
$ go get -u \
    github.com/kisielk/errcheck \
    golang.org/x/tools/cmd/goimports \
    go.chromium.org/luci/client/cmd/isolate \
    go get github.com/mikefarah/yq/v4

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