From 9589b3a476d748752a6d91fee7b7f1f8f9d75bac Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Tue, 7 Sep 2021 21:49:31 +0000 Subject: [PATCH] recipe: deprecate cipd module in favor of the engine supplied one Bug: 875523 Change-Id: I99056b760cd2bd2633773ebbb8ba062219c7d6cb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3140892 Commit-Queue: Yiwei Zhang Reviewed-by: Gavin Mak --- recipes/README.recipes.md | 136 ----- recipes/recipe_modules/cipd/__init__.py | 11 - recipes/recipe_modules/cipd/api.py | 466 ------------------ .../cipd/examples/full.expected/basic.json | 405 --------------- .../examples/full.expected/basic_pkg.json | 403 --------------- .../full.expected/describe-failed.json | 82 --- .../describe-many-instances.json | 413 ---------------- .../cipd/examples/full.expected/mac64.json | 405 --------------- .../examples/full.expected/pkg_bad_file.json | 307 ------------ .../examples/full.expected/pkg_bad_mode.json | 305 ------------ .../full.expected/pkg_bad_verfile.json | 305 ------------ .../cipd/examples/full.expected/win64.json | 405 --------------- recipes/recipe_modules/cipd/examples/full.py | 188 ------- .../platform_suffix.expected/junk arch.json | 5 - .../platform_suffix.expected/junk bits.json | 5 - .../linux_arm_32.json | 12 - .../linux_arm_64.json | 12 - .../linux_intel_32.json | 12 - .../linux_intel_64.json | 12 - .../linux_mips_64.json | 12 - .../mac_intel_64.json | 12 - .../win_intel_32.json | 12 - .../win_intel_64.json | 12 - .../cipd/examples/platform_suffix.py | 61 --- recipes/recipe_modules/cipd/test_api.py | 93 ---- 25 files changed, 4091 deletions(-) delete mode 100644 recipes/recipe_modules/cipd/__init__.py delete mode 100644 recipes/recipe_modules/cipd/api.py delete mode 100644 recipes/recipe_modules/cipd/examples/full.expected/basic.json delete mode 100644 recipes/recipe_modules/cipd/examples/full.expected/basic_pkg.json delete mode 100644 recipes/recipe_modules/cipd/examples/full.expected/describe-failed.json delete mode 100644 recipes/recipe_modules/cipd/examples/full.expected/describe-many-instances.json delete mode 100644 recipes/recipe_modules/cipd/examples/full.expected/mac64.json delete mode 100644 recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_file.json delete mode 100644 recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_mode.json delete mode 100644 recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_verfile.json delete mode 100644 recipes/recipe_modules/cipd/examples/full.expected/win64.json delete mode 100644 recipes/recipe_modules/cipd/examples/full.py delete mode 100644 recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk arch.json delete mode 100644 recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk bits.json delete mode 100644 recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_32.json delete mode 100644 recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_64.json delete mode 100644 recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_32.json delete mode 100644 recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_64.json delete mode 100644 recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_mips_64.json delete mode 100644 recipes/recipe_modules/cipd/examples/platform_suffix.expected/mac_intel_64.json delete mode 100644 recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_32.json delete mode 100644 recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_64.json delete mode 100644 recipes/recipe_modules/cipd/examples/platform_suffix.py delete mode 100644 recipes/recipe_modules/cipd/test_api.py diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 848c9ca9a..e201b795e 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -4,7 +4,6 @@ **[Recipe Modules](#Recipe-Modules)** * [bot_update](#recipe_modules-bot_update) (Python3 ✅) — Recipe module to ensure a checkout is consistent on a bot. - * [cipd](#recipe_modules-cipd) (Python3 ✅) — API for interacting with CIPD. * [depot_tools](#recipe_modules-depot_tools) (Python3 ✅) — The `depot_tools` module provides safe functions to access paths within the depot_tools repo. * [gclient](#recipe_modules-gclient) (Python3 ✅) * [gerrit](#recipe_modules-gerrit) (Python3 ✅) @@ -21,8 +20,6 @@ * [bot_update:examples/full](#recipes-bot_update_examples_full) (Python3 ✅) * [bot_update:tests/do_not_retry_patch_failures_in_cq](#recipes-bot_update_tests_do_not_retry_patch_failures_in_cq) (Python3 ✅) * [bot_update:tests/ensure_checkout](#recipes-bot_update_tests_ensure_checkout) (Python3 ✅) - * [cipd:examples/full](#recipes-cipd_examples_full) - * [cipd:examples/platform_suffix](#recipes-cipd_examples_platform_suffix) (Python3 ✅) * [depot_tools:examples/full](#recipes-depot_tools_examples_full) (Python3 ✅) * [fetch_end_to_end_test](#recipes-fetch_end_to_end_test) * [gclient:examples/full](#recipes-gclient_examples_full) (Python3 ✅) @@ -117,125 +114,6 @@ Returns (list of str): All properties that'll hold the checked-out revision Sets a fixed revision for a single dependency using project revision properties. -### *recipe_modules* / [cipd](/recipes/recipe_modules/cipd) - -[DEPS](/recipes/recipe_modules/cipd/__init__.py#3): [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step] - -PYTHON_VERSION_COMPATIBILITY: PY2+3 - -API for interacting with CIPD. - -Depends on 'cipd' binary available in PATH: -https://godoc.org/go.chromium.org/luci/cipd/client/cmd/cipd - -WARNING: There is an alternative cipd recipe_module in recipes-py.git: -https://codesearch.chromium.org/chromium/infra/recipes-py/recipe_modules/cipd/ - -Consider using that one instead. -TODO(crbug.com/875523): Delete this module. - -#### **class [CIPDApi](/recipes/recipe_modules/cipd/api.py#163)([RecipeApi][recipe_engine/wkt/RecipeApi]):** - -CIPDApi provides basic support for CIPD. - -This assumes that `cipd` (or `cipd.exe` or `cipd.bat` on windows) has been -installed somewhere in $PATH. This will be true if you use depot_tools, or if -your recipe is running inside of chrome-infrastructure's systems (buildbot, -swarming). - -— **def [build](/recipes/recipe_modules/cipd/api.py#236)(self, input_dir, output_package, package_name, install_mode=None):** - -Builds, but does not upload, a cipd package from a directory. - -Args: - input_dir (Path) - the directory to build the package from. - output_package (Path) - the file to write the package to. - package_name (str) - the name of the cipd package as it would appear when - uploaded to the cipd package server. - install_mode (None|'copy'|'symlink') - the mechanism that the cipd client - should use when installing this package. If None, defaults to the - platform default ('copy' on windows, 'symlink' on everything else). - -— **def [create\_from\_pkg](/recipes/recipe_modules/cipd/api.py#340)(self, pkg_def, refs=None, tags=None):** - -Builds and uploads a package based on a PackageDefinition object. - -This builds and uploads the package in one step. - -Args: - pkg_def (PackageDefinition) - The description of the package we want to - create. - refs (list(str)) - A list of ref names to set for the package instance. - tags (dict(str, str)) - A map of tag name -> value to set for the package - instance. - -Returns the JSON 'result' section, e.g.: { - "package": "infra/tools/cipd/android-amd64", - "instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4" -} - -— **def [create\_from\_yaml](/recipes/recipe_modules/cipd/api.py#314)(self, pkg_def, refs=None, tags=None, verification_timeout=None):** - -Builds and uploads a package based on on-disk YAML package definition -file. - -This builds and uploads the package in one step. - -Args: - pkg_def (Path) - The path to the yaml file. - refs (list(str)) - A list of ref names to set for the package instance. - tags (dict(str, str)) - A map of tag name -> value to set for the package - instance. - verification_timeout (str) - Duration string that controls the time to - wait for backend-side package hash - verification. Valid time units are "ns", - "us", "ms", "s", "m", "h". - -Returns the JSON 'result' section, e.g.: { - "package": "infra/tools/cipd/android-amd64", - "instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4" -} - -  **@property**
— **def [default\_bot\_service\_account\_credentials](/recipes/recipe_modules/cipd/api.py#200)(self):** - -— **def [describe](/recipes/recipe_modules/cipd/api.py#447)(self, package_name, version, test_data_refs=None, test_data_tags=None):** - -— **def [ensure](/recipes/recipe_modules/cipd/api.py#362)(self, root, packages):** - -Ensures that packages are installed in a given root dir. - -packages must be a mapping from package name to its version, where - * name must be for right platform (see also ``platform_suffix``), - * version could be either instance_id, or ref, or unique tag. - -If installing a package requires credentials, call -``set_service_account_credentials`` before calling this function. - -  **@property**
— **def [executable](/recipes/recipe_modules/cipd/api.py#196)(self):** - -— **def [initialize](/recipes/recipe_modules/cipd/api.py#190)(self):** - -— **def [platform\_suffix](/recipes/recipe_modules/cipd/api.py#209)(self, name=None, arch=None, bits=None):** - -Use to get full package name that is platform indepdent. - -Example: - >>> 'my/package/%s' % api.cipd.platform_suffix() - 'my/package/linux-amd64' - -Optional platform bits and architecture may be supplied to generate CIPD -suffixes for other platforms. If any are omitted, the current platform -parameters will be used. - -— **def [register](/recipes/recipe_modules/cipd/api.py#264)(self, package_name, package_path, refs=None, tags=None):** - -— **def [search](/recipes/recipe_modules/cipd/api.py#429)(self, package_name, tag):** - -— **def [set\_ref](/recipes/recipe_modules/cipd/api.py#409)(self, package_name, version, refs):** - -— **def [set\_service\_account\_credentials](/recipes/recipe_modules/cipd/api.py#193)(self, path):** - -— **def [set\_tag](/recipes/recipe_modules/cipd/api.py#389)(self, package_name, version, tags):** ### *recipe_modules* / [depot\_tools](/recipes/recipe_modules/depot_tools) [DEPS](/recipes/recipe_modules/depot_tools/__init__.py#7): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/runtime][recipe_engine/recipe_modules/runtime] @@ -1076,20 +954,6 @@ PYTHON_VERSION_COMPATIBILITY: PY2+3 PYTHON_VERSION_COMPATIBILITY: PY2+3 — **def [RunSteps](/recipes/recipe_modules/bot_update/tests/ensure_checkout.py#16)(api):** -### *recipes* / [cipd:examples/full](/recipes/recipe_modules/cipd/examples/full.py) - -[DEPS](/recipes/recipe_modules/cipd/examples/full.py#8): [cipd](#recipe_modules-cipd), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step] - -PYTHON_VERSION_COMPATIBILITY: PY2 - -— **def [RunSteps](/recipes/recipe_modules/cipd/examples/full.py#27)(api, use_pkg, pkg_files, pkg_dirs, ver_files, install_mode):** -### *recipes* / [cipd:examples/platform\_suffix](/recipes/recipe_modules/cipd/examples/platform_suffix.py) - -[DEPS](/recipes/recipe_modules/cipd/examples/platform_suffix.py#10): [cipd](#recipe_modules-cipd), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step] - -PYTHON_VERSION_COMPATIBILITY: PY2+3 - -— **def [RunSteps](/recipes/recipe_modules/cipd/examples/platform_suffix.py#24)(api, arch_override, bits_override, expect_error):** ### *recipes* / [depot\_tools:examples/full](/recipes/recipe_modules/depot_tools/examples/full.py) [DEPS](/recipes/recipe_modules/depot_tools/examples/full.py#7): [depot\_tools](#recipe_modules-depot_tools), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/runtime][recipe_engine/recipe_modules/runtime], [recipe\_engine/step][recipe_engine/recipe_modules/step] diff --git a/recipes/recipe_modules/cipd/__init__.py b/recipes/recipe_modules/cipd/__init__.py deleted file mode 100644 index 76145c4b2..000000000 --- a/recipes/recipe_modules/cipd/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -PYTHON_VERSION_COMPATIBILITY = 'PY2+3' - -DEPS = [ - 'recipe_engine/json', - 'recipe_engine/path', - 'recipe_engine/platform', - 'recipe_engine/properties', - 'recipe_engine/python', - 'recipe_engine/raw_io', - 'recipe_engine/step', -] diff --git a/recipes/recipe_modules/cipd/api.py b/recipes/recipe_modules/cipd/api.py deleted file mode 100644 index 25564148e..000000000 --- a/recipes/recipe_modules/cipd/api.py +++ /dev/null @@ -1,466 +0,0 @@ -# Copyright 2017 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""API for interacting with CIPD. - -Depends on 'cipd' binary available in PATH: -https://godoc.org/go.chromium.org/luci/cipd/client/cmd/cipd - -WARNING: There is an alternative cipd recipe_module in recipes-py.git: -https://codesearch.chromium.org/chromium/infra/recipes-py/recipe_modules/cipd/ - -Consider using that one instead. -TODO(crbug.com/875523): Delete this module. -""" - -import re - -from collections import namedtuple - -from recipe_engine import recipe_api -from recipe_engine.config_types import Path - - -def check_type(name, var, expect): - if not isinstance(var, expect): # pragma: no cover - raise TypeError('%s is not %s: %r (%s)' % ( - name, type(expect).__name__, var, type(var).__name__)) - - -def check_list_type(name, var, expect_inner): - check_type(name, var, list) - for i, itm in enumerate(var): - check_type('%s[%d]' % (name, i), itm, expect_inner) - - -def check_dict_type(name, var, expect_key, expect_value): - check_type(name, var, dict) - for key, value in var.items(): - check_type('%s: key' % name, key, expect_key) - check_type('%s[%s]' % (name, key), value, expect_value) - - -class PackageDefinition(object): - DIR = namedtuple('DIR', ['path', 'exclusions']) - - def __init__(self, package_name, package_root, install_mode=None): - """Build a new PackageDefinition. - - Args: - * package_name (str) - the name of the CIPD package - * package_root (Path) - the path on the current filesystem that all files - will be relative to. e.g. if your root is /.../foo, and you add the - file /.../foo/bar/baz.json, the final cipd package will contain - 'bar/baz.json'. - * install_mode (None|'copy'|'symlink') - the mechanism that the cipd client - should use when installing this package. If None, defaults to the - platform default ('copy' on windows, 'symlink' on everything else). - """ - check_type('package_name', package_name, str) - check_type('package_root', package_root, Path) - check_type('install_mode', install_mode, (type(None), str)) - if install_mode not in (None, 'copy', 'symlink'): - raise ValueError('invalid value for install_mode: %r' % install_mode) - self.package_name = package_name - self.package_root = package_root - self.install_mode = install_mode - - self.dirs = [] # list(DIR) - self.files = [] # list(Path) - self.version_file = None # str? - - def _rel_path(self, path): - """Returns a forward-slash-delimited version of `path` which is relative to - the package root. - - Raises ValueError if path is not inside the root. - """ - if path == self.package_root: - return '.' - if not self.package_root.is_parent_of(path): - raise ValueError( - 'path %r is not the package root %r and not a child thereof' % - (path, self.package_root)) - # We know that root has the same base and some prefix of path - return '/'.join(path.pieces[len(self.package_root.pieces):]) - - def add_dir(self, dir_path, exclusions=None): - """Recursivelys add a directory to the package. - - Args: - * dir_path (Path) - A path on the current filesystem under the - package_root to a directory which should be recursively included. - * exclusions (list(str)) - A list of regexps to exclude when scanning the - given directory. These will be tested against the forward-slash path - to the file relative to `dir_path`. - - Raises: - ValueError - dir_path is not a subdirectory of the package root. - re.error - one of the exclusions is not a valid regex. - """ - check_type('dir_path', dir_path, Path) - exclusions = exclusions or [] - check_list_type('exclusions', exclusions, str) - self.dirs.append(self.DIR(self._rel_path(dir_path), exclusions)) - - def add_file(self, file_path): - """Add a single file to the package. - - Args: - file_path (Path) - A path on the current filesystem to the file you - wish to include. - - Raises: - ValueError - file_path is not a subdirectory of the package root. - """ - check_type('file_path', file_path, Path) - self.files.append(self._rel_path(file_path)) - - def add_version_file(self, ver_file_rel): - """Instruct the cipd client to place a version file in this location when - unpacking the package. - - Version files are JSON which look like: { - "package_name": "infra/tools/cipd/android-amd64", - "instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4" - } - - The convention is to pick a location like '.versions/.cipd_version' - so that a given cipd installation root might have a .versions folder full - of these files, one per package. This file allows executables contained - in the package to look for and report this file, allowing them to display - version information about themselves. could be the name of the - binary tool, like 'cipd' in the example above. - - A version file may be specified exactly once per package. - - Args: - ver_file_rel (str) - A path string relative to the installation root. - Should be specified in posix style (forward/slashes). - """ - check_type('ver_file_rel', ver_file_rel, str) - if self.version_file is not None: - raise ValueError('add_version_file() may only be used once.') - self.version_file = ver_file_rel - - def to_jsonish(self): - """Returns a JSON representation of this PackageDefinition.""" - return { - 'package': self.package_name, - 'root': str(self.package_root), - 'install_mode': self.install_mode or '', - 'data': [ - {'file': str(f)} - for f in self.files - ]+[ - {'dir': str(d.path), 'exclude': d.exclusions} - for d in self.dirs - ]+([{'version_file': self.version_file}] if self.version_file else []) - } - - -class CIPDApi(recipe_api.RecipeApi): - """CIPDApi provides basic support for CIPD. - - This assumes that `cipd` (or `cipd.exe` or `cipd.bat` on windows) has been - installed somewhere in $PATH. This will be true if you use depot_tools, or if - your recipe is running inside of chrome-infrastructure's systems (buildbot, - swarming). - """ - PackageDefinition = PackageDefinition - - # Map for architecture mapping. First key is platform module arch, second is - # platform module bits. - _SUFFIX_ARCH_MAP = { - 'intel': { - 32: '386', - 64: 'amd64', - }, - 'mips': { - 64: 'mips64', - }, - 'arm': { - 32: 'armv6', - 64: 'arm64', - }, - } - - # pylint: disable=attribute-defined-outside-init - def initialize(self): - self._cipd_credentials = None - - def set_service_account_credentials(self, path): - self._cipd_credentials = path - - @property - def executable(self): - return 'cipd' + ('.bat' if self.m.platform.is_win else '') - - @property - def default_bot_service_account_credentials(self): - # Path to a service account credentials to use to talk to CIPD backend. - # Deployed by Puppet. - if self.m.platform.is_win: - return 'C:\\creds\\service_accounts\\service-account-cipd-builder.json' - else: - return '/creds/service_accounts/service-account-cipd-builder.json' - - def platform_suffix(self, name=None, arch=None, bits=None): - """Use to get full package name that is platform indepdent. - - Example: - >>> 'my/package/%s' % api.cipd.platform_suffix() - 'my/package/linux-amd64' - - Optional platform bits and architecture may be supplied to generate CIPD - suffixes for other platforms. If any are omitted, the current platform - parameters will be used. - """ - name = name or self.m.platform.name - arch = arch or self.m.platform.arch - bits = bits or self.m.platform.bits - - arch_map = self._SUFFIX_ARCH_MAP.get(arch) - if not arch_map: - raise KeyError('No architecture mapped for %r.' % (arch,)) - arch_str = arch_map.get(bits) - if not arch_str: - raise KeyError('No architecture mapped for %r with %r bits.' % ( - arch, bits)) - - return '%s-%s' % ( - name.replace('win', 'windows'), - arch_str) - - def build(self, input_dir, output_package, package_name, install_mode=None): - """Builds, but does not upload, a cipd package from a directory. - - Args: - input_dir (Path) - the directory to build the package from. - output_package (Path) - the file to write the package to. - package_name (str) - the name of the cipd package as it would appear when - uploaded to the cipd package server. - install_mode (None|'copy'|'symlink') - the mechanism that the cipd client - should use when installing this package. If None, defaults to the - platform default ('copy' on windows, 'symlink' on everything else). - """ - assert not install_mode or install_mode in ['copy', 'symlink'] - return self.m.step( - 'build %s' % self.m.path.basename(package_name), - [ - self.executable, - 'pkg-build', - '-in', input_dir, - '-name', package_name, - '-out', output_package, - '-json-output', self.m.json.output(), - ] + ( - ['-install-mode', install_mode] if install_mode else [] - ), - step_test_data=lambda: self.test_api.example_build(package_name) - ) - - def register(self, package_name, package_path, refs=None, tags=None): - cmd = [ - self.executable, - 'pkg-register', package_path, - '-json-output', self.m.json.output(), - ] - if self._cipd_credentials: - cmd.extend(['-service-account-json', self._cipd_credentials]) - if refs: - for ref in refs: - cmd.extend(['-ref', ref]) - if tags: - for tag, value in sorted(tags.items()): - cmd.extend(['-tag', '%s:%s' % (tag, value)]) - return self.m.step( - 'register %s' % package_name, - cmd, - step_test_data=lambda: self.test_api.example_register(package_name) - ) - - def _create(self, pkg_name, pkg_def_file_or_placeholder, - refs=None, tags=None, verification_timeout=None): - refs = refs or [] - tags = tags or {} - check_list_type('refs', refs, str) - check_dict_type('tags', tags, str, str) - cmd = [ - self.executable, - 'create', - '-pkg-def', pkg_def_file_or_placeholder, - '-json-output', self.m.json.output(), - ] - if self._cipd_credentials: - cmd.extend(['-service-account-json', self._cipd_credentials]) - if verification_timeout: - cmd.extend(['-verification-timeout', verification_timeout]) - for ref in refs: - cmd.extend(['-ref', ref]) - for tag, value in sorted(tags.items()): - cmd.extend(['-tag', '%s:%s' % (tag, value)]) - result = self.m.step( - 'create %s' % pkg_name, cmd, - step_test_data=lambda: self.test_api.m.json.output({ - 'result': self.test_api.make_pin(pkg_name), - })) - ret_data = result.json.output['result'] - result.presentation.links[ret_data['instance_id']] = ( - 'https://chrome-infra-packages.appspot.com/p/%(package)s/+/%(instance_id)s' % ret_data) - return ret_data - - def create_from_yaml(self, pkg_def, refs=None, tags=None, - verification_timeout=None): - """Builds and uploads a package based on on-disk YAML package definition - file. - - This builds and uploads the package in one step. - - Args: - pkg_def (Path) - The path to the yaml file. - refs (list(str)) - A list of ref names to set for the package instance. - tags (dict(str, str)) - A map of tag name -> value to set for the package - instance. - verification_timeout (str) - Duration string that controls the time to - wait for backend-side package hash - verification. Valid time units are "ns", - "us", "ms", "s", "m", "h". - - Returns the JSON 'result' section, e.g.: { - "package": "infra/tools/cipd/android-amd64", - "instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4" - } - """ - check_type('pkg_def', pkg_def, Path) - return self._create(self.m.path.basename(pkg_def), pkg_def, refs, tags, - verification_timeout) - - def create_from_pkg(self, pkg_def, refs=None, tags=None): - """Builds and uploads a package based on a PackageDefinition object. - - This builds and uploads the package in one step. - - Args: - pkg_def (PackageDefinition) - The description of the package we want to - create. - refs (list(str)) - A list of ref names to set for the package instance. - tags (dict(str, str)) - A map of tag name -> value to set for the package - instance. - - Returns the JSON 'result' section, e.g.: { - "package": "infra/tools/cipd/android-amd64", - "instance_id": "433bfdf86c0bb82d1eee2d1a0473d3709c25d2c4" - } - """ - check_type('pkg_def', pkg_def, PackageDefinition) - return self._create( - pkg_def.package_name, self.m.json.input(pkg_def.to_jsonish()), refs, tags) - - - def ensure(self, root, packages): - """Ensures that packages are installed in a given root dir. - - packages must be a mapping from package name to its version, where - * name must be for right platform (see also ``platform_suffix``), - * version could be either instance_id, or ref, or unique tag. - - If installing a package requires credentials, call - ``set_service_account_credentials`` before calling this function. - """ - package_list = ['%s %s' % (name, version) - for name, version in sorted(packages.items())] - ensure_file = self.m.raw_io.input('\n'.join(package_list)) - cmd = [ - self.executable, - 'ensure', - '-root', root, - '-ensure-file', ensure_file, - '-json-output', self.m.json.output(), - ] - if self._cipd_credentials: - cmd.extend(['-service-account-json', self._cipd_credentials]) - self.m.step( - 'ensure_installed', cmd, - step_test_data=lambda: self.test_api.example_ensure(packages) - ) - - def set_tag(self, package_name, version, tags): - cmd = [ - self.executable, - 'set-tag', package_name, - '-version', version, - '-json-output', self.m.json.output(), - ] - if self._cipd_credentials: - cmd.extend(['-service-account-json', self._cipd_credentials]) - for tag, value in sorted(tags.items()): - cmd.extend(['-tag', '%s:%s' % (tag, value)]) - - return self.m.step( - 'cipd set-tag %s' % package_name, - cmd, - step_test_data=lambda: self.test_api.example_set_tag( - package_name, version - ) - ) - - def set_ref(self, package_name, version, refs): - cmd = [ - self.executable, - 'set-ref', package_name, - '-version', version, - '-json-output', self.m.json.output(), - ] - if self._cipd_credentials: - cmd.extend(['-service-account-json', self._cipd_credentials]) - for r in refs: - cmd.extend(['-ref', r]) - - return self.m.step( - 'cipd set-ref %s' % package_name, - cmd, - step_test_data=lambda: self.test_api.example_set_ref( - package_name, version - ) - ) - - def search(self, package_name, tag): - assert ':' in tag, 'tag must be in a form "k:v"' - - cmd = [ - self.executable, - 'search', package_name, - '-tag', tag, - '-json-output', self.m.json.output(), - ] - if self._cipd_credentials: - cmd.extend(['-service-account-json', self._cipd_credentials]) - - return self.m.step( - 'cipd search %s %s' % (package_name, tag), - cmd, - step_test_data=lambda: self.test_api.example_search(package_name) - ) - - def describe(self, package_name, version, - test_data_refs=None, test_data_tags=None): - cmd = [ - self.executable, - 'describe', package_name, - '-version', version, - '-json-output', self.m.json.output(), - ] - if self._cipd_credentials: - cmd.extend(['-service-account-json', self._cipd_credentials]) - - return self.m.step( - 'cipd describe %s' % package_name, - cmd, - step_test_data=lambda: self.test_api.example_describe( - package_name, version, - test_data_refs=test_data_refs, - test_data_tags=test_data_tags - ) - ) diff --git a/recipes/recipe_modules/cipd/examples/full.expected/basic.json b/recipes/recipe_modules/cipd/examples/full.expected/basic.json deleted file mode 100644 index f729958b0..000000000 --- a/recipes/recipe_modules/cipd/examples/full.expected/basic.json +++ /dev/null @@ -1,405 +0,0 @@ -[ - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "public/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "ensure_installed", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "public/package/linux-amd64", - "-tag", - "git_revision:40-chars-long-hash", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd search public/package/linux-amd64 git_revision:40-chars-long-hash", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "public/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd describe public/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"buildbot_build:some.waterfall/builder/1234\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_repository:https://chromium.googlesource.com/some/repo\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_revision:397a2597cdc237f3026e6143b683be4b9ab60540\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "private/package/linux-amd64 latest\npublic/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "ensure_installed (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "private/package/linux-amd64", - "-tag", - "key:value", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search private/package/linux-amd64 key:value", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "private/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd describe private/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"custom:tagged\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"key:value\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json" - ], - "name": "build fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-install-mode", - "copy" - ], - "name": "build fake-package (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-register", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "register infra/fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "create", - "-pkg-def", - "[START_DIR]/fake-package.yaml", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-verification-timeout", - "10m", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "create fake-package.yaml", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package.yaml\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LINK@40-chars-fake-of-the-package-instance_id@https://chrome-infra-packages.appspot.com/p/fake-package.yaml/+/40-chars-fake-of-the-package-instance_id@@@" - ] - }, - { - "cmd": [ - "cipd", - "set-tag", - "fake-package", - "-version", - "long/weird/ref/which/doesn/not/fit/into/40chars", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-tag", - "dead:beaf", - "-tag", - "more:value" - ], - "name": "cipd set-tag fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-long/weird/ref/w\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "set-ref", - "fake-package", - "-version", - "latest", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "any", - "-ref", - "some" - ], - "name": "cipd set-ref fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "fake-package/linux-amd64", - "-tag", - "dead:beaf", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search fake-package/linux-amd64 dead:beaf", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/full.expected/basic_pkg.json b/recipes/recipe_modules/cipd/examples/full.expected/basic_pkg.json deleted file mode 100644 index e5b95e787..000000000 --- a/recipes/recipe_modules/cipd/examples/full.expected/basic_pkg.json +++ /dev/null @@ -1,403 +0,0 @@ -[ - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "public/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "ensure_installed", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "public/package/linux-amd64", - "-tag", - "git_revision:40-chars-long-hash", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd search public/package/linux-amd64 git_revision:40-chars-long-hash", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "public/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd describe public/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"buildbot_build:some.waterfall/builder/1234\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_repository:https://chromium.googlesource.com/some/repo\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_revision:397a2597cdc237f3026e6143b683be4b9ab60540\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "private/package/linux-amd64 latest\npublic/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "ensure_installed (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "private/package/linux-amd64", - "-tag", - "key:value", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search private/package/linux-amd64 key:value", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "private/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd describe private/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"custom:tagged\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"key:value\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json" - ], - "name": "build fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-install-mode", - "copy" - ], - "name": "build fake-package (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-register", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "register infra/fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "create", - "-pkg-def", - "{\"data\": [{\"file\": \"a/path/to/file.py\"}, {\"file\": \"some_config.cfg\"}, {\"dir\": \".\", \"exclude\": []}, {\"dir\": \"directory\", \"exclude\": []}, {\"dir\": \"other_dir\", \"exclude\": [\".*\\\\.pyc\"]}], \"install_mode\": \"\", \"package\": \"infra/fake-package\", \"root\": \"[START_DIR]/some_subdir\"}", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "create infra/fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LINK@40-chars-fake-of-the-package-instance_id@https://chrome-infra-packages.appspot.com/p/infra/fake-package/+/40-chars-fake-of-the-package-instance_id@@@" - ] - }, - { - "cmd": [ - "cipd", - "set-tag", - "fake-package", - "-version", - "long/weird/ref/which/doesn/not/fit/into/40chars", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-tag", - "dead:beaf", - "-tag", - "more:value" - ], - "name": "cipd set-tag fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-long/weird/ref/w\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "set-ref", - "fake-package", - "-version", - "latest", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "any", - "-ref", - "some" - ], - "name": "cipd set-ref fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "fake-package/linux-amd64", - "-tag", - "dead:beaf", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search fake-package/linux-amd64 dead:beaf", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/full.expected/describe-failed.json b/recipes/recipe_modules/cipd/examples/full.expected/describe-failed.json deleted file mode 100644 index 1c29185fb..000000000 --- a/recipes/recipe_modules/cipd/examples/full.expected/describe-failed.json +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "public/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "ensure_installed", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "public/package/linux-amd64", - "-tag", - "git_revision:40-chars-long-hash", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd search public/package/linux-amd64 git_revision:40-chars-long-hash", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "public/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd describe public/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"error\": \"package \\\"public/package/linux-amd64-ubuntu14_04\\\" not registered\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": null@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_FAILURE@@@" - ] - }, - { - "failure": { - "failure": {}, - "humanReason": "Step('cipd describe public/package/linux-amd64') (retcode: 1)" - }, - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/full.expected/describe-many-instances.json b/recipes/recipe_modules/cipd/examples/full.expected/describe-many-instances.json deleted file mode 100644 index 78257d820..000000000 --- a/recipes/recipe_modules/cipd/examples/full.expected/describe-many-instances.json +++ /dev/null @@ -1,413 +0,0 @@ -[ - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "public/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "ensure_installed", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "public/package/linux-amd64", - "-tag", - "git_revision:40-chars-long-hash", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd search public/package/linux-amd64 git_revision:40-chars-long-hash", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "public/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd describe public/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"buildbot_build:some.waterfall/builder/1234\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_repository:https://chromium.googlesource.com/some/repo\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_revision:397a2597cdc237f3026e6143b683be4b9ab60540\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "private/package/linux-amd64 latest\npublic/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "ensure_installed (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "private/package/linux-amd64", - "-tag", - "key:value", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search private/package/linux-amd64 key:value", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "private/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd describe private/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"custom:tagged\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"key:value\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json" - ], - "name": "build fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-install-mode", - "copy" - ], - "name": "build fake-package (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-register", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "register infra/fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "create", - "-pkg-def", - "[START_DIR]/fake-package.yaml", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-verification-timeout", - "10m", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "create fake-package.yaml", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package.yaml\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LINK@40-chars-fake-of-the-package-instance_id@https://chrome-infra-packages.appspot.com/p/fake-package.yaml/+/40-chars-fake-of-the-package-instance_id@@@" - ] - }, - { - "cmd": [ - "cipd", - "set-tag", - "fake-package", - "-version", - "long/weird/ref/which/doesn/not/fit/into/40chars", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-tag", - "dead:beaf", - "-tag", - "more:value" - ], - "name": "cipd set-tag fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-long/weird/ref/w\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "set-ref", - "fake-package", - "-version", - "latest", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "any", - "-ref", - "some" - ], - "name": "cipd set-ref fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "fake-package/linux-amd64", - "-tag", - "dead:beaf", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search fake-package/linux-amd64 dead:beaf", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-instance_id_1---\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64-ubuntu14_04\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-instance_id_2---\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64-ubuntu14_04\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-instance_id_3---\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64-ubuntu14_04\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/full.expected/mac64.json b/recipes/recipe_modules/cipd/examples/full.expected/mac64.json deleted file mode 100644 index 1896acead..000000000 --- a/recipes/recipe_modules/cipd/examples/full.expected/mac64.json +++ /dev/null @@ -1,405 +0,0 @@ -[ - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "public/package/mac-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "ensure_installed", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/mac-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "public/package/mac-amd64", - "-tag", - "git_revision:40-chars-long-hash", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd search public/package/mac-amd64 git_revision:40-chars-long-hash", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/mac-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "public/package/mac-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd describe public/package/mac-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/mac-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"buildbot_build:some.waterfall/builder/1234\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_repository:https://chromium.googlesource.com/some/repo\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_revision:397a2597cdc237f3026e6143b683be4b9ab60540\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "private/package/mac-amd64 latest\npublic/package/mac-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "ensure_installed (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/mac-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/mac-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "private/package/mac-amd64", - "-tag", - "key:value", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search private/package/mac-amd64 key:value", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/mac-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "private/package/mac-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd describe private/package/mac-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/mac-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"custom:tagged\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"key:value\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json" - ], - "name": "build fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-install-mode", - "copy" - ], - "name": "build fake-package (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-register", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "register infra/fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "create", - "-pkg-def", - "[START_DIR]/fake-package.yaml", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-verification-timeout", - "10m", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "create fake-package.yaml", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package.yaml\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LINK@40-chars-fake-of-the-package-instance_id@https://chrome-infra-packages.appspot.com/p/fake-package.yaml/+/40-chars-fake-of-the-package-instance_id@@@" - ] - }, - { - "cmd": [ - "cipd", - "set-tag", - "fake-package", - "-version", - "long/weird/ref/which/doesn/not/fit/into/40chars", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-tag", - "dead:beaf", - "-tag", - "more:value" - ], - "name": "cipd set-tag fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-long/weird/ref/w\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "set-ref", - "fake-package", - "-version", - "latest", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "any", - "-ref", - "some" - ], - "name": "cipd set-ref fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "fake-package/mac-amd64", - "-tag", - "dead:beaf", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search fake-package/mac-amd64 dead:beaf", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package/mac-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_file.json b/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_file.json deleted file mode 100644 index 1b411b43a..000000000 --- a/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_file.json +++ /dev/null @@ -1,307 +0,0 @@ -[ - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "public/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "ensure_installed", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "public/package/linux-amd64", - "-tag", - "git_revision:40-chars-long-hash", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd search public/package/linux-amd64 git_revision:40-chars-long-hash", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "public/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd describe public/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"buildbot_build:some.waterfall/builder/1234\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_repository:https://chromium.googlesource.com/some/repo\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_revision:397a2597cdc237f3026e6143b683be4b9ab60540\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "private/package/linux-amd64 latest\npublic/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "ensure_installed (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "private/package/linux-amd64", - "-tag", - "key:value", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search private/package/linux-amd64 key:value", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "private/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd describe private/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"custom:tagged\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"key:value\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json" - ], - "name": "build fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-install-mode", - "copy" - ], - "name": "build fake-package (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-register", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "register infra/fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [], - "name": "RECIPE CRASH (Uncaught exception)", - "~followup_annotations": [ - "@@@STEP_EXCEPTION@@@", - "The recipe has crashed at point 'Uncaught exception'!", - "", - "Traceback (most recent call last):", - " File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/cipd/examples/full.py\", line 70, in RunSteps", - " pkg.add_file(api.path.abs_to_path(fullpath))", - " File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/cipd/api.py\", line 118, in add_file", - " self.files.append(self._rel_path(file_path))", - " File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/cipd/api.py\", line 84, in _rel_path", - " (path, self.package_root))", - "ValueError: path Path([START_DIR], 'a', 'path', 'to', 'file.py') is not the package root Path([START_DIR], 'some_subdir') and not a child thereof" - ] - }, - { - "failure": { - "humanReason": "Uncaught Exception: ValueError(\"path Path([START_DIR], 'a', 'path', 'to', 'file.py') is not the package root Path([START_DIR], 'some_subdir') and not a child thereof\",)" - }, - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_mode.json b/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_mode.json deleted file mode 100644 index 49c428a8c..000000000 --- a/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_mode.json +++ /dev/null @@ -1,305 +0,0 @@ -[ - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "public/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "ensure_installed", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "public/package/linux-amd64", - "-tag", - "git_revision:40-chars-long-hash", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd search public/package/linux-amd64 git_revision:40-chars-long-hash", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "public/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd describe public/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"buildbot_build:some.waterfall/builder/1234\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_repository:https://chromium.googlesource.com/some/repo\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_revision:397a2597cdc237f3026e6143b683be4b9ab60540\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "private/package/linux-amd64 latest\npublic/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "ensure_installed (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "private/package/linux-amd64", - "-tag", - "key:value", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search private/package/linux-amd64 key:value", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "private/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd describe private/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"custom:tagged\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"key:value\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json" - ], - "name": "build fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-install-mode", - "copy" - ], - "name": "build fake-package (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-register", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "register infra/fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [], - "name": "RECIPE CRASH (Uncaught exception)", - "~followup_annotations": [ - "@@@STEP_EXCEPTION@@@", - "The recipe has crashed at point 'Uncaught exception'!", - "", - "Traceback (most recent call last):", - " File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/cipd/examples/full.py\", line 68, in RunSteps", - " pkg = api.cipd.PackageDefinition('infra/fake-package', root, install_mode)", - " File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/cipd/api.py\", line 64, in __init__", - " raise ValueError('invalid value for install_mode: %r' % install_mode)", - "ValueError: invalid value for install_mode: ''" - ] - }, - { - "failure": { - "humanReason": "Uncaught Exception: ValueError(\"invalid value for install_mode: ''\",)" - }, - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_verfile.json b/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_verfile.json deleted file mode 100644 index 730f5071e..000000000 --- a/recipes/recipe_modules/cipd/examples/full.expected/pkg_bad_verfile.json +++ /dev/null @@ -1,305 +0,0 @@ -[ - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "public/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "ensure_installed", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "public/package/linux-amd64", - "-tag", - "git_revision:40-chars-long-hash", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd search public/package/linux-amd64 git_revision:40-chars-long-hash", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "public/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "/creds/service_accounts/service-account-cipd-builder.json" - ], - "name": "cipd describe public/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"buildbot_build:some.waterfall/builder/1234\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_repository:https://chromium.googlesource.com/some/repo\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_revision:397a2597cdc237f3026e6143b683be4b9ab60540\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/packages", - "-ensure-file", - "private/package/linux-amd64 latest\npublic/package/linux-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "ensure_installed (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "search", - "private/package/linux-amd64", - "-tag", - "key:value", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search private/package/linux-amd64 key:value", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "private/package/linux-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd describe private/package/linux-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"custom:tagged\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"key:value\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json" - ], - "name": "build fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-install-mode", - "copy" - ], - "name": "build fake-package (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd", - "pkg-register", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "register infra/fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [], - "name": "RECIPE CRASH (Uncaught exception)", - "~followup_annotations": [ - "@@@STEP_EXCEPTION@@@", - "The recipe has crashed at point 'Uncaught exception'!", - "", - "Traceback (most recent call last):", - " File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/cipd/examples/full.py\", line 76, in RunSteps", - " pkg.add_version_file(pth)", - " File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/cipd/api.py\", line 144, in add_version_file", - " raise ValueError('add_version_file() may only be used once.')", - "ValueError: add_version_file() may only be used once." - ] - }, - { - "failure": { - "humanReason": "Uncaught Exception: ValueError('add_version_file() may only be used once.',)" - }, - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/full.expected/win64.json b/recipes/recipe_modules/cipd/examples/full.expected/win64.json deleted file mode 100644 index 9a5314c58..000000000 --- a/recipes/recipe_modules/cipd/examples/full.expected/win64.json +++ /dev/null @@ -1,405 +0,0 @@ -[ - { - "cmd": [ - "cipd.bat", - "ensure", - "-root", - "[START_DIR]\\packages", - "-ensure-file", - "public/package/windows-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "C:\\creds\\service_accounts\\service-account-cipd-builder.json" - ], - "name": "ensure_installed", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/windows-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "search", - "public/package/windows-amd64", - "-tag", - "git_revision:40-chars-long-hash", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "C:\\creds\\service_accounts\\service-account-cipd-builder.json" - ], - "name": "cipd search public/package/windows-amd64 git_revision:40-chars-long-hash", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/windows-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "describe", - "public/package/windows-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "C:\\creds\\service_accounts\\service-account-cipd-builder.json" - ], - "name": "cipd describe public/package/windows-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/windows-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"buildbot_build:some.waterfall/builder/1234\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_repository:https://chromium.googlesource.com/some/repo\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_revision:397a2597cdc237f3026e6143b683be4b9ab60540\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "ensure", - "-root", - "[START_DIR]\\packages", - "-ensure-file", - "private/package/windows-amd64 latest\npublic/package/windows-amd64 7f751b2237df2fdf3c1405be00590fefffbaea2d", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "ensure_installed (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/windows-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"7f751b2237df2fdf3c1405be00590fefffbaea2d\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"public/package/windows-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "search", - "private/package/windows-amd64", - "-tag", - "key:value", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search private/package/windows-amd64 key:value", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/windows-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "describe", - "private/package/windows-amd64", - "-version", - "40-chars-fake-of-the-package-instance_id", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd describe private/package/windows-amd64", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"private/package/windows-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"custom:tagged\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"key:value\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json" - ], - "name": "build fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "pkg-build", - "-in", - "fake-input-dir", - "-name", - "infra/fake-package", - "-out", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-install-mode", - "copy" - ], - "name": "build fake-package (2)", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "pkg-register", - "fake-package-path", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "register infra/fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "create", - "-pkg-def", - "[START_DIR]\\fake-package.yaml", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-verification-timeout", - "10m", - "-ref", - "fake-ref-1", - "-ref", - "fake-ref-2", - "-tag", - "fake_tag_1:fake_value_1", - "-tag", - "fake_tag_2:fake_value_2" - ], - "name": "create fake-package.yaml", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package.yaml\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LINK@40-chars-fake-of-the-package-instance_id@https://chrome-infra-packages.appspot.com/p/fake-package.yaml/+/40-chars-fake-of-the-package-instance_id@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "set-tag", - "fake-package", - "-version", - "long/weird/ref/which/doesn/not/fit/into/40chars", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-tag", - "dead:beaf", - "-tag", - "more:value" - ], - "name": "cipd set-tag fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-long/weird/ref/w\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "set-ref", - "fake-package", - "-version", - "latest", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json", - "-ref", - "any", - "-ref", - "some" - ], - "name": "cipd set-ref fake-package", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "cipd.bat", - "search", - "fake-package/windows-amd64", - "-tag", - "dead:beaf", - "-json-output", - "/path/to/tmp/json", - "-service-account-json", - "fake-credentials.json" - ], - "name": "cipd search fake-package/windows-amd64 dead:beaf", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fake-package/windows-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/full.py b/recipes/recipe_modules/cipd/examples/full.py deleted file mode 100644 index 1a2814a6b..000000000 --- a/recipes/recipe_modules/cipd/examples/full.py +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright 2015 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from recipe_engine.config import List, Single, ConfigList, ConfigGroup -from recipe_engine.recipe_api import Property - -DEPS = [ - 'recipe_engine/path', - 'recipe_engine/platform', - 'recipe_engine/properties', - 'recipe_engine/step', - 'cipd', -] - -PROPERTIES = { - 'use_pkg': Property(default=False, kind=bool), - 'pkg_files': Property(default=(), kind=List(str)), - 'pkg_dirs': Property(default=(), kind=ConfigList(lambda: ConfigGroup( - path=Single(str), - exclusions=List(str), - ))), - 'ver_files': Property(default=(), kind=List(str)), - 'install_mode': Property(default=None), -} - -def RunSteps(api, use_pkg, pkg_files, pkg_dirs, ver_files, install_mode): - # Need to set service account credentials. - api.cipd.set_service_account_credentials( - api.cipd.default_bot_service_account_credentials) - - package_name = 'public/package/%s' % api.cipd.platform_suffix() - package_instance_id = '7f751b2237df2fdf3c1405be00590fefffbaea2d' - packages = {package_name: package_instance_id} - - cipd_root = api.path['start_dir'].join('packages') - # Some packages don't require credentials to be installed or queried. - api.cipd.ensure(cipd_root, packages) - step = api.cipd.search(package_name, tag='git_revision:40-chars-long-hash') - api.cipd.describe(package_name, - version=step.json.output['result'][0]['instance_id']) - - # Others do, so provide creds first. - api.cipd.set_service_account_credentials('fake-credentials.json') - private_package_name = 'private/package/%s' % api.cipd.platform_suffix() - packages[private_package_name] = 'latest' - api.cipd.ensure(cipd_root, packages) - step = api.cipd.search(private_package_name, tag='key:value') - api.cipd.describe(private_package_name, - version=step.json.output['result'][0]['instance_id'], - test_data_tags=['custom:tagged', 'key:value'], - test_data_refs=['latest']) - - # The rest of commands expect credentials to be set. - - # Build & register new package version. - api.cipd.build('fake-input-dir', 'fake-package-path', 'infra/fake-package') - api.cipd.build('fake-input-dir', 'fake-package-path', 'infra/fake-package', - install_mode='copy') - api.cipd.register('infra/fake-package', 'fake-package-path', - refs=['fake-ref-1', 'fake-ref-2'], - tags={'fake_tag_1': 'fake_value_1', - 'fake_tag_2': 'fake_value_2'}) - - # Create (build & register). - if use_pkg: - root = api.path['start_dir'].join('some_subdir') - pkg = api.cipd.PackageDefinition('infra/fake-package', root, install_mode) - for fullpath in pkg_files: - pkg.add_file(api.path.abs_to_path(fullpath)) - pkg.add_dir(root) - for obj in pkg_dirs: - pkg.add_dir(api.path.abs_to_path(obj.get('path', '')), - obj.get('exclusions')) - for pth in ver_files: - pkg.add_version_file(pth) - - api.cipd.create_from_pkg(pkg, - refs=['fake-ref-1', 'fake-ref-2'], - tags={'fake_tag_1': 'fake_value_1', - 'fake_tag_2': 'fake_value_2'}) - else: - api.cipd.create_from_yaml(api.path['start_dir'].join('fake-package.yaml'), - refs=['fake-ref-1', 'fake-ref-2'], - tags={'fake_tag_1': 'fake_value_1', - 'fake_tag_2': 'fake_value_2'}, - verification_timeout='10m') - - - # Set tag or ref of an already existing package. - api.cipd.set_tag('fake-package', - version='long/weird/ref/which/doesn/not/fit/into/40chars', - tags={'dead': 'beaf', 'more': 'value'}) - api.cipd.set_ref('fake-package', version='latest', refs=['any', 'some']) - # Search by the new tag. - api.cipd.search('fake-package/%s' % api.cipd.platform_suffix(), - tag='dead:beaf') - - -def GenTests(api): - yield ( - # This is very common dev workstation, but not all devs are on it. - api.test('basic') - + api.platform('linux', 64) - ) - - yield ( - api.test('mac64') - + api.platform('mac', 64) - ) - - yield ( - api.test('win64') - + api.platform('win', 64) - ) - - yield ( - api.test('describe-failed') - + api.platform('linux', 64) - + api.override_step_data( - 'cipd describe public/package/linux-amd64', - api.cipd.example_error( - 'package "public/package/linux-amd64-ubuntu14_04" not registered', - )) - ) - - yield ( - api.test('describe-many-instances') - + api.platform('linux', 64) - + api.override_step_data( - 'cipd search fake-package/linux-amd64 dead:beaf', - api.cipd.example_search( - 'public/package/linux-amd64-ubuntu14_04', - instances=3 - )) - ) - - yield ( - api.test('basic_pkg') - + api.properties( - use_pkg=True, - pkg_files=[ - '[START_DIR]/some_subdir/a/path/to/file.py', - '[START_DIR]/some_subdir/some_config.cfg', - ], - pkg_dirs=[ - { - 'path': '[START_DIR]/some_subdir/directory', - }, - { - 'path': '[START_DIR]/some_subdir/other_dir', - 'exclusions': [ - r'.*\.pyc', - ] - }, - ], - ver_file=['.versions/file.cipd_version'], - ) - ) - - yield ( - api.test('pkg_bad_verfile') - + api.properties( - use_pkg=True, - ver_files=['a', 'b'], - ) - + api.expect_exception('ValueError') - ) - - yield ( - api.test('pkg_bad_mode') - + api.properties( - use_pkg=True, - install_mode='', - ) - + api.expect_exception('ValueError') - ) - - yield ( - api.test('pkg_bad_file') - + api.properties( - use_pkg=True, - pkg_files=[ - '[START_DIR]/a/path/to/file.py', - ], - ) - + api.expect_exception('ValueError') - ) diff --git a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk arch.json b/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk arch.json deleted file mode 100644 index b6042b610..000000000 --- a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk arch.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk bits.json b/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk bits.json deleted file mode 100644 index b6042b610..000000000 --- a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/junk bits.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_32.json b/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_32.json deleted file mode 100644 index 46efc44c9..000000000 --- a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_32.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "cmd": [ - "echo", - "linux-armv6" - ], - "name": "platform_suffix" - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_64.json b/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_64.json deleted file mode 100644 index 4ede93bf8..000000000 --- a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_arm_64.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "cmd": [ - "echo", - "linux-arm64" - ], - "name": "platform_suffix" - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_32.json b/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_32.json deleted file mode 100644 index ab61db27f..000000000 --- a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_32.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "cmd": [ - "echo", - "linux-386" - ], - "name": "platform_suffix" - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_64.json b/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_64.json deleted file mode 100644 index de7ae4748..000000000 --- a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_intel_64.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "cmd": [ - "echo", - "linux-amd64" - ], - "name": "platform_suffix" - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_mips_64.json b/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_mips_64.json deleted file mode 100644 index 62810ae70..000000000 --- a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/linux_mips_64.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "cmd": [ - "echo", - "linux-mips64" - ], - "name": "platform_suffix" - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/mac_intel_64.json b/recipes/recipe_modules/cipd/examples/platform_suffix.expected/mac_intel_64.json deleted file mode 100644 index eaabfed53..000000000 --- a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/mac_intel_64.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "cmd": [ - "echo", - "mac-amd64" - ], - "name": "platform_suffix" - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_32.json b/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_32.json deleted file mode 100644 index 318c5f14e..000000000 --- a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_32.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "cmd": [ - "echo", - "windows-386" - ], - "name": "platform_suffix" - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_64.json b/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_64.json deleted file mode 100644 index a89996f5c..000000000 --- a/recipes/recipe_modules/cipd/examples/platform_suffix.expected/win_intel_64.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "cmd": [ - "echo", - "windows-amd64" - ], - "name": "platform_suffix" - }, - { - "name": "$result" - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/cipd/examples/platform_suffix.py b/recipes/recipe_modules/cipd/examples/platform_suffix.py deleted file mode 100644 index 157269ddf..000000000 --- a/recipes/recipe_modules/cipd/examples/platform_suffix.py +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2015 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from recipe_engine.config import List, Single, ConfigList, ConfigGroup -from recipe_engine.recipe_api import Property - -PYTHON_VERSION_COMPATIBILITY = 'PY2+3' - -DEPS = [ - 'recipe_engine/path', - 'recipe_engine/platform', - 'recipe_engine/properties', - 'recipe_engine/step', - 'cipd', -] - -PROPERTIES = { - 'arch_override': Property(kind=str, default=None), - 'bits_override': Property(kind=int, default=None), - 'expect_error': Property(kind=bool, default=False), -} - -def RunSteps(api, arch_override, bits_override, expect_error): - was_error = False - try: - api.step('platform_suffix', ['echo', api.cipd.platform_suffix( - arch=arch_override, - bits=bits_override, - )]) - except KeyError: - was_error = True - - assert was_error == expect_error - - -def GenTests(api): - for name, arch, bits in ( - ('linux', 'intel', 32), - ('linux', 'intel', 64), - ('linux', 'mips', 64), - ('linux', 'arm', 32), - ('linux', 'arm', 64), - ('mac', 'intel', 64), - ('win', 'intel', 32), - ('win', 'intel', 64)): - test = ( - api.test('%s_%s_%d' % (name, arch, bits)) + - api.platform(name, bits) - ) - if arch != 'intel': - test += api.properties(arch_override=arch) - yield test - - yield ( - api.test('junk arch') + - api.properties(arch_override='pants', expect_error=True)) - - yield ( - api.test('junk bits') + - api.properties(bits_override=42, expect_error=True)) diff --git a/recipes/recipe_modules/cipd/test_api.py b/recipes/recipe_modules/cipd/test_api.py deleted file mode 100644 index d0cb1db65..000000000 --- a/recipes/recipe_modules/cipd/test_api.py +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 2015 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from recipe_engine import recipe_test_api - - -class CIPDTestApi(recipe_test_api.RecipeTestApi): - def make_resolved_version(self, v): - if not v: - return '40-chars-fake-of-the-package-instance_id' - if len(v) == 40: - return v - # Truncate or pad to 40 chars. - prefix = 'resolved-instance_id-of-' - if len(v) + len(prefix) >= 40: - return '%s%s' % (prefix, v[:40-len(prefix)]) - return '%s%s%s' % (prefix, v, '-' * (40 - len(prefix) - len(v))) - - def make_pin(self, package_name, version=None): - return { - 'package': package_name.replace('${platform}', 'resolved-platform'), - 'instance_id': self.make_resolved_version(version), - } - - def _resultify(self, result, error=None, retcode=None): - dic = {'result': result} - if error: - dic['error'] = error - return self.m.json.output(dic, retcode=retcode) - - def example_error(self, error, retcode=None): - return self._resultify( - result=None, - error=error, - retcode=1 if retcode is None else retcode) - - def example_build(self, package_name, version=None): - return self._resultify(self.make_pin(package_name, version)) - - example_register = example_build - - def example_ensure(self, packages): - return self._resultify([self.make_pin(name, version) - for name, version in sorted(packages.items())]) - - def example_set_tag(self, package_name, version): - return self._resultify({ - 'package': package_name, - 'pin': self.make_pin(package_name, version) - }) - - example_set_ref = example_set_tag - - def example_search(self, package_name, instances=None): - if instances is None: - # Return one instance by default. - return self._resultify([self.make_pin(package_name)]) - if isinstance(instances, int): - instances = ['instance_id_%i' % (i+1) for i in range(instances)] - return self._resultify([self.make_pin(package_name, instance) - for instance in instances]) - - def example_describe(self, package_name, version=None, - test_data_refs=None, test_data_tags=None, - user='user:44-blablbla@developer.gserviceaccount.com', - tstamp=1446574210): - assert not test_data_tags or all(':' in tag for tag in test_data_tags) - return self._resultify({ - 'pin': self.make_pin(package_name, version), - 'registered_by': user, - 'registered_ts': tstamp, - 'refs': [ - { - 'ref': ref, - 'modified_by': user, - 'modified_ts': tstamp, - } - for ref in (['latest'] if test_data_refs is None else test_data_refs) - ], - 'tags': [ - { - 'tag': tag, - 'registered_by': user, - 'registered_ts': tstamp, - } - for tag in ([ - 'buildbot_build:some.waterfall/builder/1234', - 'git_repository:https://chromium.googlesource.com/some/repo', - 'git_revision:397a2597cdc237f3026e6143b683be4b9ab60540', - ] if test_data_tags is None else test_data_tags) - ], - })