[cipd] Add lucicfg tool.

It knows how to interpret configuration files written in Starlark-based
DSL and produce a bunch of protobuf messages as a result.

Will be used to generate various infra configs. In particular, will be
used by infra developers (to update configs), by PRESUBMIT.py on dev
machines (to verify configs before uploading CLs) and by bots (to verify
configs before submitting CLs).

R=tandrii@chromium.org
BUG=833946

Change-Id: Iceec7d808ce180f7d4a341fab8b5ce11933c2a6b
Reviewed-on: https://chromium-review.googlesource.com/c/1444499
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
4 files changed
tree: 6a7d833f2b61f475fa81799e0f9cc80086af0bfb
  1. bootstrap/
  2. fetch_configs/
  3. git-templates/
  4. infra/
  5. man/
  6. recipes/
  7. support/
  8. testing_support/
  9. tests/
  10. third_party/
  11. win_toolchain/
  12. zsh-goodies/
  13. .gitattributes
  14. .gitignore
  15. .style.yapf
  16. annotated_gclient.py
  17. appengine_mapper.py
  18. auth.py
  19. autoninja
  20. autoninja.bat
  21. autoninja.py
  22. breakpad.py
  23. buildbucket.py
  24. checkout.py
  25. cipd
  26. cipd.bat
  27. cipd.ps1
  28. cipd_bin_setup.bat
  29. cipd_bin_setup.sh
  30. cipd_client_version
  31. cipd_client_version.digests
  32. cipd_manifest.txt
  33. cipd_manifest.versions
  34. cit
  35. cit.bat
  36. cit.py
  37. clang-format
  38. clang-format.bat
  39. clang_format.py
  40. clang_format_merge_driver
  41. clang_format_merge_driver.bat
  42. clang_format_merge_driver.py
  43. codereview.settings
  44. compile_single_file
  45. compile_single_file.bat
  46. compile_single_file.py
  47. cpplint.bat
  48. cpplint.py
  49. cpplint_chromium.py
  50. CROS_OWNERS
  51. dart_format.py
  52. depot-tools-auth
  53. depot-tools-auth.bat
  54. depot-tools-auth.py
  55. detect_host_arch.py
  56. download_from_google_storage
  57. download_from_google_storage.bat
  58. download_from_google_storage.py
  59. ensure_bootstrap
  60. fetch
  61. fetch.bat
  62. fetch.py
  63. fix_encoding.py
  64. gclient
  65. gclient-new-workdir.py
  66. gclient.bat
  67. gclient.py
  68. gclient_completion.sh
  69. gclient_eval.py
  70. gclient_scm.py
  71. gclient_utils.py
  72. gerrit_client.py
  73. gerrit_util.py
  74. git-cache
  75. git-cl
  76. git-crrev-parse
  77. git-drover
  78. git-find-releases
  79. git-footers
  80. git-freeze
  81. git-gs
  82. git-hyper-blame
  83. git-map
  84. git-map-branches
  85. git-mark-merge-base
  86. git-nav-downstream
  87. git-nav-upstream
  88. git-new-branch
  89. git-number
  90. git-rebase-update
  91. git-rename-branch
  92. git-reparent-branch
  93. git-retry
  94. git-runhooks
  95. git-squash-branch
  96. git-thaw
  97. git-upstream-diff
  98. git_cache.py
  99. git_cl.py
  100. git_cl_completion.sh
  101. git_common.py
  102. git_dates.py
  103. git_drover.py
  104. git_find_releases.py
  105. git_footers.py
  106. git_freezer.py
  107. git_hyper_blame.py
  108. git_map.py
  109. git_map_branches.py
  110. git_mark_merge_base.py
  111. git_nav_downstream.py
  112. git_new_branch.py
  113. git_number.py
  114. git_rebase_update.py
  115. git_rename_branch.py
  116. git_reparent_branch.py
  117. git_retry.py
  118. git_squash_branch.py
  119. git_upstream_diff.py
  120. gn
  121. gn.bat
  122. gn.py
  123. gsutil.py
  124. gsutil.py.bat
  125. gsutil.vpython
  126. led
  127. led.bat
  128. LICENSE
  129. luci-auth
  130. luci-auth.bat
  131. lucicfg
  132. lucicfg.bat
  133. mac_toolchain
  134. metrics.py
  135. metrics.README.md
  136. metrics_utils.py
  137. my_activity.py
  138. my_reviews.py
  139. ninja
  140. ninja-linux32
  141. ninja-linux64
  142. ninja-mac
  143. ninja.exe
  144. ninjalog.README.md
  145. ninjalog_uploader.py
  146. ninjalog_uploader_wrapper.py
  147. OWNERS
  148. owners.py
  149. owners_finder.py
  150. patch.py
  151. post_build_ninja_summary.py
  152. PRESUBMIT.py
  153. presubmit_canned_checks.py
  154. presubmit_support.py
  155. profile.xml
  156. prpc
  157. prpc.bat
  158. pylint
  159. pylint.py
  160. pylintrc
  161. python_runner.sh
  162. README.gclient.md
  163. README.git-cl.md
  164. README.md
  165. README.testing
  166. repo
  167. rietveld.py
  168. roll-dep
  169. roll-dep-svn
  170. roll-dep-svn.bat
  171. roll-dep.bat
  172. roll_dep.py
  173. roll_dep_svn.py
  174. scm.py
  175. setup_color.py
  176. split_cl.py
  177. subcommand.py
  178. subprocess2.py
  179. update_depot_tools
  180. update_depot_tools.bat
  181. update_depot_tools_toggle.py
  182. upload_metrics.py
  183. upload_to_google_storage.py
  184. vpython
  185. vpython.bat
  186. WATCHLISTS
  187. watchlists.py
  188. weekly
  189. wtf
  190. yapf
  191. yapf.bat
README.md

depot_tools

Tools for working with Chromium development. It requires python 2.7.

Tools

The most important tools are:

  • fetch: A gclient wrapper to checkout a project. Use fetch --help for more details.
  • gclient: A meta-checkout tool. Think repo or git submodules, except that it support OS-specific rules, e.g. do not checkout Windows only dependencies when checking out for Android. Use gclient help for more details and README.gclient.md.
  • git cl: A code review tool to interact with Rietveld or Gerrit. Use git cl help for more details and README.git-cl.md.
  • roll-dep: A gclient dependency management tool to submit a dep roll, updating a dependency to a newer revision.

There are a lot of git utilities included.

Updating

depot_tools updates itself automatically when running gclient tool. To disable auto update, set the environment variable DEPOT_TOOLS_UPDATE=0.

To update package manually, run update_depot_tools.bat on Windows, or ./update_depot_tools on Linux or Mac.

On Windows only, running gclient will install git and python.

Contributing

To contribute change for review:

git new-branch <somename>
# Hack
git add .
git commit -a -m "Fixes goat teleporting"
# find reviewers
git cl owners
git log -- <yourfiles>

# Request a review.
git cl upload -r reviewer1@chromium.org,reviewer2@chromium.org --send-mail

# Edit change description if needed.
git cl desc

# If change is approved, flag it to be committed.
git cl set-commit

# If change needs more work.
git rebase-update
...
git cl upload -t "Fixes goat teleporter destination to be Australia"

See also open bugs, open reviews, forum or report problems.

cpplint.py

Until 2018, our cpplint.py was a copy of the upstream version at https://github.com/google/styleguide/tree/gh-pages/cpplint. Unfortunately, that repository is not maintained any more. If you want to update cpplint.py in depot_tools, just upload a patch to do so. We will figure out a long-term strategy via issue https://crbug.com/916550.

Note that the cpplint.py here is also used by the Tricium analyzer, so if the cpplint.py here changes, we should also update the copy used there.