libv8 5.6.326.50.0beta1 → 5.7.492.65.0beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -1
  3. data/README.md +1 -0
  4. data/Rakefile +8 -1
  5. data/ext/libv8/arch.rb +5 -5
  6. data/ext/libv8/builder.rb +9 -5
  7. data/lib/libv8/version.rb +1 -1
  8. data/patches/0001-Build-a-standalone-static-library.patch +2 -2
  9. data/patches/0002-Don-t-compile-unnecessary-stuff.patch +11 -7
  10. data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +2 -2
  11. data/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch +2 -2
  12. data/vendor/depot_tools/.gitignore +1 -0
  13. data/vendor/depot_tools/cbuildbot +1 -1
  14. data/vendor/depot_tools/chrome_set_ver +1 -1
  15. data/vendor/depot_tools/cipd_client_version +1 -1
  16. data/vendor/depot_tools/cit.py +1 -1
  17. data/vendor/depot_tools/cpplint.py +2 -1
  18. data/vendor/depot_tools/cros +1 -1
  19. data/vendor/depot_tools/cros_sdk +1 -1
  20. data/vendor/depot_tools/gclient.py +3 -2
  21. data/vendor/depot_tools/gerrit_util.py +99 -55
  22. data/vendor/depot_tools/git_cache.py +22 -6
  23. data/vendor/depot_tools/git_cl.py +532 -92
  24. data/vendor/depot_tools/git_common.py +3 -1
  25. data/vendor/depot_tools/infra/config/recipes.cfg +21 -8
  26. data/vendor/depot_tools/man/html/depot_tools.html +9 -1
  27. data/vendor/depot_tools/man/html/git-cl.html +1025 -0
  28. data/vendor/depot_tools/man/html/git-squash-branch.html +2 -2
  29. data/vendor/depot_tools/man/html/git-upstream-diff.html +1 -1
  30. data/vendor/depot_tools/man/man1/git-cl.1 +193 -0
  31. data/vendor/depot_tools/man/man1/git-squash-branch.1 +4 -4
  32. data/vendor/depot_tools/man/man1/git-upstream-diff.1 +3 -3
  33. data/vendor/depot_tools/man/man7/depot_tools.7 +8 -3
  34. data/vendor/depot_tools/man/src/_git-cl_desc.helper.txt +1 -0
  35. data/vendor/depot_tools/man/src/git-cl.txt +116 -0
  36. data/vendor/depot_tools/my_activity.py +226 -50
  37. data/vendor/depot_tools/owners.py +50 -25
  38. data/vendor/depot_tools/presubmit_canned_checks.py +3 -0
  39. data/vendor/depot_tools/presubmit_support.py +19 -0
  40. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/OWNERS +0 -0
  41. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/__init__.py +0 -0
  42. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/api.py +14 -11
  43. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/apply_gerrit_ref.json +1 -0
  44. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/basic.json +1 -0
  45. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/basic_output_manifest.json +1 -0
  46. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/basic_with_branch_heads.json +1 -0
  47. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/buildbot.json +1 -0
  48. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/clobber.json +1 -0
  49. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/gerrit_no_rebase_patch_ref.json +1 -0
  50. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/gerrit_no_reset.json +1 -0
  51. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/no_shallow.json +1 -0
  52. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/reset_root_solution_revision.json +1 -0
  53. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange.json +1 -0
  54. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2.json +0 -0
  55. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2_buildbot.json +1 -0
  56. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2_json.json +1 -0
  57. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/trychange_oauth2_json_win.json +1 -0
  58. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob.json +1 -0
  59. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_fail.json +1 -0
  60. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_fail_patch.json +1 -0
  61. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_fail_patch_download.json +2 -0
  62. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_gerrit_angle.json +1 -0
  63. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_gerrit_angle_deprecated.json +1 -0
  64. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_v8.json +1 -0
  65. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.expected/tryjob_v8_head_by_default.json +1 -0
  66. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/example.py +0 -0
  67. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/resources/__init__.py +0 -0
  68. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/resources/apply_gerrit.py +0 -0
  69. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/resources/bot_update.py +2 -2
  70. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/bot_update/test_api.py +0 -0
  71. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/__init__.py +0 -0
  72. data/vendor/depot_tools/recipes/recipe_modules/cipd/api.py +412 -0
  73. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/basic.json +8 -2
  74. data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/basic_pkg.json +405 -0
  75. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/describe-failed.json +0 -0
  76. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/describe-many-instances.json +8 -2
  77. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/mac64.json +8 -2
  78. data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/pkg_bad_file.json +289 -0
  79. data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/pkg_bad_mode.json +289 -0
  80. data/vendor/depot_tools/recipes/recipe_modules/cipd/example.expected/pkg_bad_verfile.json +289 -0
  81. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.expected/win64.json +21 -15
  82. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/example.py +101 -20
  83. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/cipd/test_api.py +0 -0
  84. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/__init__.py +0 -0
  85. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/api.py +0 -0
  86. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/example.expected/basic.json +0 -0
  87. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/example.expected/win.json +0 -0
  88. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/depot_tools/example.py +0 -0
  89. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/__init__.py +0 -0
  90. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/api.py +12 -10
  91. data/vendor/depot_tools/recipes/recipe_modules/gclient/bundle_extra_paths.txt +4 -0
  92. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/config.py +0 -0
  93. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/basic.json +9 -0
  94. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/buildbot.json +9 -0
  95. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/revision.json +9 -0
  96. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.expected/tryserver.json +9 -0
  97. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/example.py +0 -0
  98. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gclient/test_api.py +0 -0
  99. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/__init__.py +1 -0
  100. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/api.py +11 -10
  101. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/example.expected/basic.json +2 -0
  102. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/example.py +0 -0
  103. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gerrit/test_api.py +0 -0
  104. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/__init__.py +0 -0
  105. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/api.py +8 -7
  106. data/vendor/depot_tools/recipes/recipe_modules/git/bundle_extra_paths.txt +28 -0
  107. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic.json +17 -0
  108. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_branch.json +17 -0
  109. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_file_name.json +17 -0
  110. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_hash.json +17 -0
  111. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_ref.json +17 -0
  112. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/basic_submodule_update_force.json +17 -0
  113. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/can_fail_build.json +12 -0
  114. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/cannot_fail_build.json +17 -0
  115. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/cat-file_test.json +19 -0
  116. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_delta.json +19 -0
  117. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_failed.json +17 -0
  118. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_with_bad_output.json +17 -0
  119. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/count-objects_with_bad_output_fails_build.json +7 -0
  120. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/curl_trace_file.json +17 -0
  121. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/git-cache-checkout.json +20 -0
  122. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/platform_win.json +18 -0
  123. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/rebase_failed.json +17 -0
  124. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/remote_not_origin.json +17 -0
  125. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.expected/set_got_revision.json +17 -0
  126. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/example.py +0 -0
  127. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/resources/git_setup.py +0 -0
  128. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git/test_api.py +0 -0
  129. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/__init__.py +0 -0
  130. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/api.py +0 -0
  131. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/config.py +0 -0
  132. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/example.expected/basic.json +0 -0
  133. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/git_cl/example.py +0 -0
  134. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/__init__.py +0 -0
  135. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/api.py +0 -0
  136. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/example.expected/basic.json +11 -0
  137. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/example.py +0 -0
  138. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/gsutil/resources/gsutil_smart_retry.py +0 -0
  139. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/__init__.py +0 -0
  140. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/api.py +0 -0
  141. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/example.expected/basic.json +1 -2
  142. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +15 -0
  143. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +15 -0
  144. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +15 -0
  145. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_generic_linux.json +15 -0
  146. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_generic_mac.json +15 -0
  147. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_generic_win.json +15 -0
  148. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +15 -0
  149. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +15 -0
  150. data/vendor/depot_tools/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +15 -0
  151. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/example.py +2 -3
  152. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/infra_paths/path_config.py +5 -3
  153. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/__init__.py +1 -0
  154. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/api.py +7 -6
  155. data/vendor/depot_tools/recipes/recipe_modules/presubmit/bundle_extra_paths.txt +30 -0
  156. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/example.expected/basic.json +0 -0
  157. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/presubmit/example.py +0 -0
  158. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/__init__.py +0 -0
  159. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/api.py +0 -0
  160. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/example.expected/basic.json +0 -0
  161. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/example.expected/buildbot.json +0 -0
  162. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/rietveld/example.py +0 -0
  163. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/__init__.py +0 -0
  164. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/api.py +0 -0
  165. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/basic_tags.json +0 -0
  166. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/set_failure_hash_with_no_steps.json +0 -0
  167. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_gerrit_patch.json +1 -0
  168. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_gerrit_patch_deprecated.json +1 -0
  169. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_git_patch.json +4 -0
  170. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_git_patch_luci.json +0 -0
  171. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_rietveld_patch.json +4 -2
  172. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_rietveld_patch_new.json +4 -2
  173. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_wrong_patch.json +2 -0
  174. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.expected/with_wrong_patch_new.json +2 -0
  175. data/vendor/depot_tools/{recipe_modules → recipes/recipe_modules}/tryserver/example.py +0 -0
  176. data/vendor/depot_tools/{recipes.py → recipes/recipes.py} +57 -81
  177. data/vendor/depot_tools/roll_dep.py +13 -5
  178. data/vendor/depot_tools/scm.py +7 -0
  179. data/vendor/depot_tools/third_party/upload.py +4 -0
  180. data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +3 -39
  181. data/vendor/depot_tools/win_toolchain/package_from_installed.py +159 -114
  182. metadata +144 -133
  183. data/vendor/depot_tools/recipe_modules/cipd/api.py +0 -219
  184. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +0 -16
  185. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +0 -16
  186. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +0 -16
  187. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +0 -16
  188. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +0 -16
  189. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +0 -16
  190. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json +0 -16
  191. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json +0 -16
  192. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json +0 -16
@@ -0,0 +1,412 @@
1
+ # Copyright 2017 The Chromium Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ import re
6
+
7
+ from collections import namedtuple
8
+
9
+ from recipe_engine import recipe_api
10
+ from recipe_engine.config_types import Path
11
+
12
+
13
+ def check_type(name, var, expect):
14
+ if not isinstance(var, expect): # pragma: no cover
15
+ raise TypeError('%s is not %s: %r (%s)' % (
16
+ name, type(expect).__name__, var, type(var).__name__))
17
+
18
+
19
+ def check_list_type(name, var, expect_inner):
20
+ check_type(name, var, list)
21
+ for i, itm in enumerate(var):
22
+ check_type('%s[%d]' % (name, i), itm, expect_inner)
23
+
24
+
25
+ def check_dict_type(name, var, expect_key, expect_value):
26
+ check_type(name, var, dict)
27
+ for key, value in var.iteritems():
28
+ check_type('%s: key' % name, key, expect_key)
29
+ check_type('%s[%s]' % (name, key), value, expect_value)
30
+
31
+
32
+ class PackageDefinition(object):
33
+ DIR = namedtuple('DIR', ['path', 'exclusions'])
34
+
35
+ def __init__(self, package_name, package_root, install_mode=None):
36
+ """Build a new PackageDefinition.
37
+
38
+ Args:
39
+ package_name (str) - the name of the CIPD package
40
+ package_root (Path) - the path on the current filesystem that all files
41
+ will be relative to. e.g. if your root is /.../foo, and you add the
42
+ file /.../foo/bar/baz.json, the final cipd package will contain
43
+ 'bar/baz.json'.
44
+ install_mode (None|'copy'|'symlink') - the mechanism that the cipd client
45
+ should use when installing this package. If None, defaults to the
46
+ platform default ('copy' on windows, 'symlink' on everything else).
47
+ """
48
+ check_type('package_name', package_name, str)
49
+ check_type('package_root', package_root, Path)
50
+ check_type('install_mode', install_mode, (type(None), str))
51
+ if install_mode not in (None, 'copy', 'symlink'):
52
+ raise ValueError('invalid value for install_mode: %r' % install_mode)
53
+ self.package_name = package_name
54
+ self.package_root = package_root
55
+ self.install_mode = install_mode
56
+
57
+ self.dirs = [] # list(DIR)
58
+ self.files = [] # list(Path)
59
+ self.version_file = None # str?
60
+
61
+ def _rel_path(self, path):
62
+ """Returns a forward-slash-delimited version of `path` which is relative to
63
+ the package root. Will raise ValueError if path is not inside the root."""
64
+ if not self.package_root.is_parent_of(path):
65
+ raise ValueError('path %r is not a child of the package root %r' %
66
+ (path, self.package_root))
67
+ # we know that root has the same base and some prefix of path
68
+ return '/'.join(path.pieces[len(self.package_root.pieces):])
69
+
70
+ def add_dir(self, dir_path, exclusions=None):
71
+ """Recursively add a directory to the package.
72
+
73
+ Args:
74
+ dir_path (Path) - A path on the current filesystem under the
75
+ package_root to a directory which should be recursively included.
76
+ exclusions (list(str)) - A list of regexps to exclude when scanning the
77
+ given directory. These will be tested against the forward-slash path
78
+ to the file relative to `dir_path`.
79
+
80
+ Raises:
81
+ ValueError - dir_path is not a subdirectory of the package root.
82
+ re.error - one of the exclusions is not a valid regex.
83
+ """
84
+ check_type('dir_path', dir_path, Path)
85
+ exclusions = exclusions or []
86
+ check_list_type('exclusions', exclusions, str)
87
+ self.dirs.append(self.DIR(self._rel_path(dir_path), exclusions))
88
+
89
+ def add_file(self, file_path):
90
+ """Add a single file to the package.
91
+
92
+ Args:
93
+ file_path (Path) - A path on the current filesystem to the file you
94
+ wish to include.
95
+
96
+ Raises:
97
+ ValueError - file_path is not a subdirectory of the package root.
98
+ """
99
+ check_type('file_path', file_path, Path)
100
+ self.files.append(self._rel_path(file_path))
101
+
102
+ def add_version_file(self, ver_file_rel):
103
+ """Instruct the cipd client to place a version file in this location when
104
+ unpacking the package.
105
+
106
+ Version files are JSON which look like: {
107
+ "package_name": "infra/tools/cipd/android-amd64",
108
+ "instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4"
109
+ }
110
+
111
+ The convention is to pick a location like '.versions/<name>.cipd_version'
112
+ so that a given cipd installation root might have a .versions folder full
113
+ of these files, one per package. This file allows executables contained
114
+ in the package to look for and report this file, allowing them to display
115
+ version information about themselves. <name> could be the name of the
116
+ binary tool, like 'cipd' in the example above.
117
+
118
+ A version file may be specifed exactly once per package.
119
+
120
+ Args:
121
+ ver_file_rel (str) - A path string relative to the installation root.
122
+ Should be specified in posix style (forward/slashes).
123
+ """
124
+ check_type('ver_file_rel', ver_file_rel, str)
125
+ if self.version_file is not None:
126
+ raise ValueError('add_version_file() may only be used once.')
127
+ self.version_file = ver_file_rel
128
+
129
+ def to_jsonish(self):
130
+ """Returns a JSON representation of this PackageDefinition."""
131
+ return {
132
+ 'package': self.package_name,
133
+ 'root': str(self.package_root),
134
+ 'install_mode': self.install_mode or '',
135
+ 'data': [
136
+ {'file': str(f)}
137
+ for f in self.files
138
+ ]+[
139
+ {'dir': str(d.path), 'exclude': d.exclusions}
140
+ for d in self.dirs
141
+ ]+([{'version_file': self.version_file}] if self.version_file else [])
142
+ }
143
+
144
+
145
+ class CIPDApi(recipe_api.RecipeApi):
146
+ """CIPDApi provides basic support for CIPD.
147
+
148
+ This assumes that `cipd` (or `cipd.exe` or `cipd.bat` on windows) has been
149
+ installed somewhere in $PATH. This will be true if you use depot_tools, or if
150
+ your recipe is running inside of chrome-infrastructure's systems (buildbot,
151
+ swarming).
152
+ """
153
+ PackageDefinition = PackageDefinition
154
+
155
+ # pylint: disable=attribute-defined-outside-init
156
+ def initialize(self):
157
+ self._cipd_credentials = None
158
+
159
+ def set_service_account_credentials(self, path):
160
+ self._cipd_credentials = path
161
+
162
+ @property
163
+ def executable(self):
164
+ return 'cipd' + ('.bat' if self.m.platform.is_win else '')
165
+
166
+ @property
167
+ def default_bot_service_account_credentials(self):
168
+ # Path to a service account credentials to use to talk to CIPD backend.
169
+ # Deployed by Puppet.
170
+ if self.m.platform.is_win:
171
+ return 'C:\\creds\\service_accounts\\service-account-cipd-builder.json'
172
+ else:
173
+ return '/creds/service_accounts/service-account-cipd-builder.json'
174
+
175
+ def platform_suffix(self):
176
+ """Use to get full package name that is platform indepdent.
177
+
178
+ Example:
179
+ >>> 'my/package/%s' % api.cipd.platform_suffix()
180
+ 'my/package/linux-amd64'
181
+ """
182
+ return '%s-%s' % (
183
+ self.m.platform.name.replace('win', 'windows'),
184
+ {
185
+ 32: '386',
186
+ 64: 'amd64',
187
+ }[self.m.platform.bits],
188
+ )
189
+
190
+ def build(self, input_dir, output_package, package_name, install_mode=None):
191
+ """Builds, but does not upload, a cipd package from a directory.
192
+
193
+ Args:
194
+ input_dir (Path) - the directory to build the package from.
195
+ output_package (Path) - the file to write the package to.
196
+ package_name (str) - the name of the cipd package as it would appear when
197
+ uploaded to the cipd package server.
198
+ install_mode (None|'copy'|'symlink') - the mechanism that the cipd client
199
+ should use when installing this package. If None, defaults to the
200
+ platform default ('copy' on windows, 'symlink' on everything else).
201
+ """
202
+ assert not install_mode or install_mode in ['copy', 'symlink']
203
+ return self.m.step(
204
+ 'build %s' % self.m.path.basename(package_name),
205
+ [
206
+ self.executable,
207
+ 'pkg-build',
208
+ '-in', input_dir,
209
+ '-name', package_name,
210
+ '-out', output_package,
211
+ '-json-output', self.m.json.output(),
212
+ ] + (
213
+ ['-install-mode', install_mode] if install_mode else []
214
+ ),
215
+ step_test_data=lambda: self.test_api.example_build(package_name)
216
+ )
217
+
218
+ def register(self, package_name, package_path, refs=None, tags=None):
219
+ cmd = [
220
+ self.executable,
221
+ 'pkg-register', package_path,
222
+ '-json-output', self.m.json.output(),
223
+ ]
224
+ if self._cipd_credentials:
225
+ cmd.extend(['-service-account-json', self._cipd_credentials])
226
+ if refs:
227
+ for ref in refs:
228
+ cmd.extend(['-ref', ref])
229
+ if tags:
230
+ for tag, value in sorted(tags.items()):
231
+ cmd.extend(['-tag', '%s:%s' % (tag, value)])
232
+ return self.m.step(
233
+ 'register %s' % package_name,
234
+ cmd,
235
+ step_test_data=lambda: self.test_api.example_register(package_name)
236
+ )
237
+
238
+ def _create(self, pkg_name, pkg_def_file_or_placeholder,
239
+ refs=None, tags=None):
240
+ refs = refs or []
241
+ tags = tags or {}
242
+ check_list_type('refs', refs, str)
243
+ check_dict_type('tags', tags, str, str)
244
+ cmd = [
245
+ self.executable,
246
+ 'create',
247
+ '-pkg-def', pkg_def_file_or_placeholder,
248
+ '-json-output', self.m.json.output(),
249
+ ]
250
+ if self._cipd_credentials:
251
+ cmd.extend(['-service-account-json', self._cipd_credentials])
252
+ for ref in refs:
253
+ cmd.extend(['-ref', ref])
254
+ for tag, value in sorted(tags.items()):
255
+ cmd.extend(['-tag', '%s:%s' % (tag, value)])
256
+ result = self.m.step(
257
+ 'create %s' % pkg_name, cmd,
258
+ step_test_data=lambda: self.test_api.m.json.output({
259
+ 'result': self.test_api.make_pin(pkg_name),
260
+ }))
261
+ ret_data = result.json.output['result']
262
+ result.presentation.step_text = '</br>pkg: %(package)s' % ret_data
263
+ result.presentation.step_text += '</br>id: %(instance_id)s' % ret_data
264
+ return ret_data
265
+
266
+ def create_from_yaml(self, pkg_def, refs=None, tags=None):
267
+ """Builds and uploads a package based on on-disk YAML package definition
268
+ file.
269
+
270
+ This builds and uploads the package in one step.
271
+
272
+ Args:
273
+ pkg_def (Path) - The path to the yaml file.
274
+ refs (list(str)) - A list of ref names to set for the package instance.
275
+ tags (dict(str, str)) - A map of tag name -> value to set for the package
276
+ instance.
277
+
278
+ Returns the JSON 'result' section, e.g.: {
279
+ "package": "infra/tools/cipd/android-amd64",
280
+ "instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4"
281
+ }
282
+ """
283
+ check_type('pkg_def', pkg_def, Path)
284
+ return self._create(self.m.path.basename(pkg_def), pkg_def, refs, tags)
285
+
286
+ def create_from_pkg(self, pkg_def, refs=None, tags=None):
287
+ """Builds and uploads a package based on a PackageDefinition object.
288
+
289
+ This builds and uploads the package in one step.
290
+
291
+ Args:
292
+ pkg_def (PackageDefinition) - The description of the package we want to
293
+ create.
294
+ refs (list(str)) - A list of ref names to set for the package instance.
295
+ tags (dict(str, str)) - A map of tag name -> value to set for the package
296
+ instance.
297
+
298
+ Returns the JSON 'result' section, e.g.: {
299
+ "package": "infra/tools/cipd/android-amd64",
300
+ "instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4"
301
+ }
302
+ """
303
+ check_type('pkg_def', pkg_def, PackageDefinition)
304
+ return self._create(
305
+ pkg_def.package_name, self.m.json.input(pkg_def.to_jsonish()), refs, tags)
306
+
307
+
308
+ def ensure(self, root, packages):
309
+ """Ensures that packages are installed in a given root dir.
310
+
311
+ packages must be a mapping from package name to its version, where
312
+ * name must be for right platform (see also ``platform_suffix``),
313
+ * version could be either instance_id, or ref, or unique tag.
314
+
315
+ If installing a package requires credentials, call
316
+ ``set_service_account_credentials`` before calling this function.
317
+ """
318
+ package_list = ['%s %s' % (name, version)
319
+ for name, version in sorted(packages.items())]
320
+ ensure_file = self.m.raw_io.input('\n'.join(package_list))
321
+ cmd = [
322
+ self.executable,
323
+ 'ensure',
324
+ '-root', root,
325
+ '-ensure-file', ensure_file,
326
+ '-json-output', self.m.json.output(),
327
+ ]
328
+ if self._cipd_credentials:
329
+ cmd.extend(['-service-account-json', self._cipd_credentials])
330
+ self.m.step(
331
+ 'ensure_installed', cmd,
332
+ step_test_data=lambda: self.test_api.example_ensure(packages)
333
+ )
334
+
335
+ def set_tag(self, package_name, version, tags):
336
+ cmd = [
337
+ self.executable,
338
+ 'set-tag', package_name,
339
+ '-version', version,
340
+ '-json-output', self.m.json.output(),
341
+ ]
342
+ if self._cipd_credentials:
343
+ cmd.extend(['-service-account-json', self._cipd_credentials])
344
+ for tag, value in sorted(tags.items()):
345
+ cmd.extend(['-tag', '%s:%s' % (tag, value)])
346
+
347
+ return self.m.step(
348
+ 'cipd set-tag %s' % package_name,
349
+ cmd,
350
+ step_test_data=lambda: self.test_api.example_set_tag(
351
+ package_name, version
352
+ )
353
+ )
354
+
355
+ def set_ref(self, package_name, version, refs):
356
+ cmd = [
357
+ self.executable,
358
+ 'set-ref', package_name,
359
+ '-version', version,
360
+ '-json-output', self.m.json.output(),
361
+ ]
362
+ if self._cipd_credentials:
363
+ cmd.extend(['-service-account-json', self._cipd_credentials])
364
+ for r in refs:
365
+ cmd.extend(['-ref', r])
366
+
367
+ return self.m.step(
368
+ 'cipd set-ref %s' % package_name,
369
+ cmd,
370
+ step_test_data=lambda: self.test_api.example_set_ref(
371
+ package_name, version
372
+ )
373
+ )
374
+
375
+ def search(self, package_name, tag):
376
+ assert ':' in tag, 'tag must be in a form "k:v"'
377
+
378
+ cmd = [
379
+ self.executable,
380
+ 'search', package_name,
381
+ '-tag', tag,
382
+ '-json-output', self.m.json.output(),
383
+ ]
384
+ if self._cipd_credentials:
385
+ cmd.extend(['-service-account-json', self._cipd_credentials])
386
+
387
+ return self.m.step(
388
+ 'cipd search %s %s' % (package_name, tag),
389
+ cmd,
390
+ step_test_data=lambda: self.test_api.example_search(package_name)
391
+ )
392
+
393
+ def describe(self, package_name, version,
394
+ test_data_refs=None, test_data_tags=None):
395
+ cmd = [
396
+ self.executable,
397
+ 'describe', package_name,
398
+ '-version', version,
399
+ '-json-output', self.m.json.output(),
400
+ ]
401
+ if self._cipd_credentials:
402
+ cmd.extend(['-service-account-json', self._cipd_credentials])
403
+
404
+ return self.m.step(
405
+ 'cipd describe %s' % package_name,
406
+ cmd,
407
+ step_test_data=lambda: self.test_api.example_describe(
408
+ package_name, version,
409
+ test_data_refs=test_data_refs,
410
+ test_data_tags=test_data_tags
411
+ )
412
+ )
@@ -302,8 +302,14 @@
302
302
  ],
303
303
  "name": "create fake-package.yaml",
304
304
  "~followup_annotations": [
305
- "@@@STEP_LOG_LINE@json.output (invalid)@null@@@",
306
- "@@@STEP_LOG_END@json.output (invalid)@@@"
305
+ "@@@STEP_TEXT@</br>pkg: fake-package.yaml</br>id: 40-chars-fake-of-the-package-instance_id@@@",
306
+ "@@@STEP_LOG_LINE@json.output@{@@@",
307
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
308
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@",
309
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package.yaml\"@@@",
310
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
311
+ "@@@STEP_LOG_LINE@json.output@}@@@",
312
+ "@@@STEP_LOG_END@json.output@@@"
307
313
  ]
308
314
  },
309
315
  {
@@ -0,0 +1,405 @@
1
+ [
2
+ {
3
+ "cmd": [
4
+ "cipd",
5
+ "ensure",
6
+ "-root",
7
+ "[START_DIR]/packages",
8
+ "-ensure-file",
9
+ "public/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d",
10
+ "-json-output",
11
+ "/path/to/tmp/json",
12
+ "-service-account-json",
13
+ "/creds/service_accounts/service-account-cipd-builder.json"
14
+ ],
15
+ "name": "ensure_installed",
16
+ "~followup_annotations": [
17
+ "@@@STEP_LOG_LINE@json.output@{@@@",
18
+ "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@",
19
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
20
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@",
21
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@",
22
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
23
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
24
+ "@@@STEP_LOG_LINE@json.output@}@@@",
25
+ "@@@STEP_LOG_END@json.output@@@"
26
+ ]
27
+ },
28
+ {
29
+ "cmd": [
30
+ "cipd",
31
+ "search",
32
+ "public/package/linux-amd64",
33
+ "-tag",
34
+ "git_revision:40-chars-long-hash",
35
+ "-json-output",
36
+ "/path/to/tmp/json",
37
+ "-service-account-json",
38
+ "/creds/service_accounts/service-account-cipd-builder.json"
39
+ ],
40
+ "name": "cipd search public/package/linux-amd64 git_revision:40-chars-long-hash",
41
+ "~followup_annotations": [
42
+ "@@@STEP_LOG_LINE@json.output@{@@@",
43
+ "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@",
44
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
45
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@",
46
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@",
47
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
48
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
49
+ "@@@STEP_LOG_LINE@json.output@}@@@",
50
+ "@@@STEP_LOG_END@json.output@@@"
51
+ ]
52
+ },
53
+ {
54
+ "cmd": [
55
+ "cipd",
56
+ "describe",
57
+ "public/package/linux-amd64",
58
+ "-version",
59
+ "40-chars-fake-of-the-package-instance_id",
60
+ "-json-output",
61
+ "/path/to/tmp/json",
62
+ "-service-account-json",
63
+ "/creds/service_accounts/service-account-cipd-builder.json"
64
+ ],
65
+ "name": "cipd describe public/package/linux-amd64",
66
+ "~followup_annotations": [
67
+ "@@@STEP_LOG_LINE@json.output@{@@@",
68
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
69
+ "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@",
70
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@",
71
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@",
72
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
73
+ "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@",
74
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
75
+ "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@",
76
+ "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@",
77
+ "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@",
78
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
79
+ "@@@STEP_LOG_LINE@json.output@ ], @@@",
80
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@",
81
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@",
82
+ "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@",
83
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
84
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@",
85
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@",
86
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"buildbot_build:some.waterfall/builder/1234\"@@@",
87
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
88
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
89
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@",
90
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@",
91
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_repository:https://chromium.googlesource.com/some/repo\"@@@",
92
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
93
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
94
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@",
95
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@",
96
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_revision:397a2597cdc237f3026e6143b683be4b9ab60540\"@@@",
97
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
98
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
99
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
100
+ "@@@STEP_LOG_LINE@json.output@}@@@",
101
+ "@@@STEP_LOG_END@json.output@@@"
102
+ ]
103
+ },
104
+ {
105
+ "cmd": [
106
+ "cipd",
107
+ "ensure",
108
+ "-root",
109
+ "[START_DIR]/packages",
110
+ "-ensure-file",
111
+ "private/package/linux-amd64 latest\npublic/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d",
112
+ "-json-output",
113
+ "/path/to/tmp/json",
114
+ "-service-account-json",
115
+ "fake-credentials.json"
116
+ ],
117
+ "name": "ensure_installed (2)",
118
+ "~followup_annotations": [
119
+ "@@@STEP_LOG_LINE@json.output@{@@@",
120
+ "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@",
121
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
122
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
123
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@",
124
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
125
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
126
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@",
127
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@",
128
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
129
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
130
+ "@@@STEP_LOG_LINE@json.output@}@@@",
131
+ "@@@STEP_LOG_END@json.output@@@"
132
+ ]
133
+ },
134
+ {
135
+ "cmd": [
136
+ "cipd",
137
+ "search",
138
+ "private/package/linux-amd64",
139
+ "-tag",
140
+ "key:value",
141
+ "-json-output",
142
+ "/path/to/tmp/json",
143
+ "-service-account-json",
144
+ "fake-credentials.json"
145
+ ],
146
+ "name": "cipd search private/package/linux-amd64 key:value",
147
+ "~followup_annotations": [
148
+ "@@@STEP_LOG_LINE@json.output@{@@@",
149
+ "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@",
150
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
151
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@",
152
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@",
153
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
154
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
155
+ "@@@STEP_LOG_LINE@json.output@}@@@",
156
+ "@@@STEP_LOG_END@json.output@@@"
157
+ ]
158
+ },
159
+ {
160
+ "cmd": [
161
+ "cipd",
162
+ "describe",
163
+ "private/package/linux-amd64",
164
+ "-version",
165
+ "40-chars-fake-of-the-package-instance_id",
166
+ "-json-output",
167
+ "/path/to/tmp/json",
168
+ "-service-account-json",
169
+ "fake-credentials.json"
170
+ ],
171
+ "name": "cipd describe private/package/linux-amd64",
172
+ "~followup_annotations": [
173
+ "@@@STEP_LOG_LINE@json.output@{@@@",
174
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
175
+ "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@",
176
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@",
177
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@",
178
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
179
+ "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@",
180
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
181
+ "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@",
182
+ "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@",
183
+ "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@",
184
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
185
+ "@@@STEP_LOG_LINE@json.output@ ], @@@",
186
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@",
187
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@",
188
+ "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@",
189
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
190
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@",
191
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@",
192
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"custom:tagged\"@@@",
193
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
194
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
195
+ "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@",
196
+ "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@",
197
+ "@@@STEP_LOG_LINE@json.output@ \"tag\": \"key:value\"@@@",
198
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
199
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
200
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
201
+ "@@@STEP_LOG_LINE@json.output@}@@@",
202
+ "@@@STEP_LOG_END@json.output@@@"
203
+ ]
204
+ },
205
+ {
206
+ "cmd": [
207
+ "cipd",
208
+ "pkg-build",
209
+ "-in",
210
+ "fake-input-dir",
211
+ "-name",
212
+ "infra/fake-package",
213
+ "-out",
214
+ "fake-package-path",
215
+ "-json-output",
216
+ "/path/to/tmp/json"
217
+ ],
218
+ "name": "build fake-package",
219
+ "~followup_annotations": [
220
+ "@@@STEP_LOG_LINE@json.output@{@@@",
221
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
222
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@",
223
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@",
224
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
225
+ "@@@STEP_LOG_LINE@json.output@}@@@",
226
+ "@@@STEP_LOG_END@json.output@@@"
227
+ ]
228
+ },
229
+ {
230
+ "cmd": [
231
+ "cipd",
232
+ "pkg-build",
233
+ "-in",
234
+ "fake-input-dir",
235
+ "-name",
236
+ "infra/fake-package",
237
+ "-out",
238
+ "fake-package-path",
239
+ "-json-output",
240
+ "/path/to/tmp/json",
241
+ "-install-mode",
242
+ "copy"
243
+ ],
244
+ "name": "build fake-package (2)",
245
+ "~followup_annotations": [
246
+ "@@@STEP_LOG_LINE@json.output@{@@@",
247
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
248
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@",
249
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@",
250
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
251
+ "@@@STEP_LOG_LINE@json.output@}@@@",
252
+ "@@@STEP_LOG_END@json.output@@@"
253
+ ]
254
+ },
255
+ {
256
+ "cmd": [
257
+ "cipd",
258
+ "pkg-register",
259
+ "fake-package-path",
260
+ "-json-output",
261
+ "/path/to/tmp/json",
262
+ "-service-account-json",
263
+ "fake-credentials.json",
264
+ "-ref",
265
+ "fake-ref-1",
266
+ "-ref",
267
+ "fake-ref-2",
268
+ "-tag",
269
+ "fake_tag_1:fake_value_1",
270
+ "-tag",
271
+ "fake_tag_2:fake_value_2"
272
+ ],
273
+ "name": "register infra/fake-package",
274
+ "~followup_annotations": [
275
+ "@@@STEP_LOG_LINE@json.output@{@@@",
276
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
277
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@",
278
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@",
279
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
280
+ "@@@STEP_LOG_LINE@json.output@}@@@",
281
+ "@@@STEP_LOG_END@json.output@@@"
282
+ ]
283
+ },
284
+ {
285
+ "cmd": [
286
+ "cipd",
287
+ "create",
288
+ "-pkg-def",
289
+ "{\"data\": [{\"file\": \"a/path/to/file.py\"}, {\"file\": \"some_config.cfg\"}, {\"dir\": \"directory\", \"exclude\": []}, {\"dir\": \"other_dir\", \"exclude\": [\".*\\\\.pyc\"]}], \"install_mode\": \"\", \"package\": \"infra/fake-package\", \"root\": \"[START_DIR]/some_subdir\"}",
290
+ "-json-output",
291
+ "/path/to/tmp/json",
292
+ "-service-account-json",
293
+ "fake-credentials.json",
294
+ "-ref",
295
+ "fake-ref-1",
296
+ "-ref",
297
+ "fake-ref-2",
298
+ "-tag",
299
+ "fake_tag_1:fake_value_1",
300
+ "-tag",
301
+ "fake_tag_2:fake_value_2"
302
+ ],
303
+ "name": "create infra/fake-package",
304
+ "~followup_annotations": [
305
+ "@@@STEP_TEXT@</br>pkg: infra/fake-package</br>id: 40-chars-fake-of-the-package-instance_id@@@",
306
+ "@@@STEP_LOG_LINE@json.output@{@@@",
307
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
308
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@",
309
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@",
310
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
311
+ "@@@STEP_LOG_LINE@json.output@}@@@",
312
+ "@@@STEP_LOG_END@json.output@@@"
313
+ ]
314
+ },
315
+ {
316
+ "cmd": [
317
+ "cipd",
318
+ "set-tag",
319
+ "fake-package",
320
+ "-version",
321
+ "long/weird/ref/which/doesn/not/fit/into/40chars",
322
+ "-json-output",
323
+ "/path/to/tmp/json",
324
+ "-service-account-json",
325
+ "fake-credentials.json",
326
+ "-tag",
327
+ "dead:beaf",
328
+ "-tag",
329
+ "more:value"
330
+ ],
331
+ "name": "cipd set-tag fake-package",
332
+ "~followup_annotations": [
333
+ "@@@STEP_LOG_LINE@json.output@{@@@",
334
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
335
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@",
336
+ "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@",
337
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-long/weird/ref/w\", @@@",
338
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@",
339
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
340
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
341
+ "@@@STEP_LOG_LINE@json.output@}@@@",
342
+ "@@@STEP_LOG_END@json.output@@@"
343
+ ]
344
+ },
345
+ {
346
+ "cmd": [
347
+ "cipd",
348
+ "set-ref",
349
+ "fake-package",
350
+ "-version",
351
+ "latest",
352
+ "-json-output",
353
+ "/path/to/tmp/json",
354
+ "-service-account-json",
355
+ "fake-credentials.json",
356
+ "-ref",
357
+ "any",
358
+ "-ref",
359
+ "some"
360
+ ],
361
+ "name": "cipd set-ref fake-package",
362
+ "~followup_annotations": [
363
+ "@@@STEP_LOG_LINE@json.output@{@@@",
364
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
365
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@",
366
+ "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@",
367
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
368
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@",
369
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
370
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
371
+ "@@@STEP_LOG_LINE@json.output@}@@@",
372
+ "@@@STEP_LOG_END@json.output@@@"
373
+ ]
374
+ },
375
+ {
376
+ "cmd": [
377
+ "cipd",
378
+ "search",
379
+ "fake-package/linux-amd64",
380
+ "-tag",
381
+ "dead:beaf",
382
+ "-json-output",
383
+ "/path/to/tmp/json",
384
+ "-service-account-json",
385
+ "fake-credentials.json"
386
+ ],
387
+ "name": "cipd search fake-package/linux-amd64 dead:beaf",
388
+ "~followup_annotations": [
389
+ "@@@STEP_LOG_LINE@json.output@{@@@",
390
+ "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@",
391
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
392
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@",
393
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package/linux-amd64\"@@@",
394
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
395
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
396
+ "@@@STEP_LOG_LINE@json.output@}@@@",
397
+ "@@@STEP_LOG_END@json.output@@@"
398
+ ]
399
+ },
400
+ {
401
+ "name": "$result",
402
+ "recipe_result": null,
403
+ "status_code": 0
404
+ }
405
+ ]