[jiri] Remove infra/ folder.

Change-Id: Idac7518ff2df84cacc6a949ab001bd821328fd4a
Reviewed-on: https://fuchsia-review.googlesource.com/c/jiri/+/443560
Reviewed-by: Haowei Wu <haowei@google.com>
Commit-Queue: Nathan Mulcahey <nmulcahey@google.com>
diff --git a/infra/config/README.md b/infra/config/README.md
deleted file mode 100644
index c036d61..0000000
--- a/infra/config/README.md
+++ /dev/null
@@ -1 +0,0 @@
-This directory contains configuration files for infra services.
diff --git a/infra/config/cq.cfg b/infra/config/cq.cfg
deleted file mode 100644
index 7495151..0000000
--- a/infra/config/cq.cfg
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 2016 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# See http://luci-config.appspot.com/schemas/projects/refs:cq.cfg for the
-# documentation of this file format.
-
-version: 1
-cq_name: "jiri"
-cq_status_url: "https://fuchsia-cq-status.appspot.com"
-git_repo_url: "https://fuchsia.googlesource.com/jiri"
-
-gerrit {}
-
-verifiers {
-  try_job {
-    buckets {
-      name: "luci.jiri.ci",
-      builders {
-        name: "Linux x86-64"
-      }
-      builders {
-        name: "Mac x86-64"
-      }
-    }
-  }
-  gerrit_cq_ability {
-    committer_list: "project-fuchsia-committers"
-    dry_run_access_list: "project-fuchsia-tryjob-access"
-  }
-  sign_cla {}
-}
diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg
deleted file mode 100644
index 365b31b..0000000
--- a/infra/config/recipes.cfg
+++ /dev/null
@@ -1,15 +0,0 @@
-api_version: 1
-project_id: "jiri"
-recipes_path: "infra"
-deps {
-  project_id: "recipe_engine"
-  url: "https://chromium.googlesource.com/external/github.com/luci/recipes-py.git"
-  branch: "master"
-  revision: "86fea566ec648a47fbe81cce049fa8ad8b7f5ce5"
-}
-deps {
-  project_id: "infra"
-  url: "https://fuchsia.googlesource.com/infra"
-  branch: "master"
-  revision: "2344228501e8f469141379d62de46f1c68f8a23c"
-}
diff --git a/infra/recipes.py b/infra/recipes.py
deleted file mode 100644
index fd658d4..0000000
--- a/infra/recipes.py
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright 2016 The LUCI Authors. All rights reserved.
-# Use of this source code is governed under the Apache License, Version 2.0
-# that can be found in the LICENSE file.
-
-"""Bootstrap script to clone and forward to the recipe engine tool.
-
-***********************************************************************
-** DO NOT MODIFY EXCEPT IN THE PER-REPO CONFIGURATION SECTION BELOW. **
-***********************************************************************
-
-This is a copy of https://github.com/luci/recipes-py/blob/master/doc/recipes.py.
-To fix bugs, fix in the github repo then copy it back to here and fix the
-PER-REPO CONFIGURATION section to look like this one.
-"""
-
-import os
-
-#### PER-REPO CONFIGURATION (editable) ####
-# The root of the repository relative to the directory of this file.
-REPO_ROOT = os.pardir
-# The path of the recipes.cfg file relative to the root of the repository.
-RECIPES_CFG = os.path.join('infra', 'config', 'recipes.cfg')
-#### END PER-REPO CONFIGURATION ####
-
-BOOTSTRAP_VERSION = 1
-
-import ast
-import logging
-import random
-import re
-import subprocess
-import sys
-import time
-import traceback
-
-
-def parse_protobuf(fh):
-  """Parse the protobuf text format just well enough to understand recipes.cfg.
-
-  We don't use the protobuf library because we want to be as self-contained
-  as possible in this bootstrap, so it can be simply vendored into a client
-  repo.
-
-  We assume all fields are repeated since we don't have a proto spec to work
-  with.
-
-  Args:
-    fh: a filehandle containing the text format protobuf.
-  Returns:
-    A recursive dictionary of lists.
-  """
-  def parse_atom(field, text):
-    if text == 'true':
-      return True
-    if text == 'false':
-      return False
-
-    # repo_type is an enum. Since it does not have quotes,
-    # invoking literal_eval would fail.
-    if field == 'repo_type':
-      return text
-
-    return ast.literal_eval(text)
-
-  ret = {}
-  for line in fh:
-    line = line.strip()
-    m = re.match(r'(\w+)\s*:\s*(.*)', line)
-    if m:
-      ret.setdefault(m.group(1), []).append(parse_atom(m.group(1), m.group(2)))
-      continue
-
-    m = re.match(r'(\w+)\s*{', line)
-    if m:
-      subparse = parse_protobuf(fh)
-      ret.setdefault(m.group(1), []).append(subparse)
-      continue
-
-    if line == '}':
-      return ret
-    if line == '':
-      continue
-
-    raise ValueError('Could not understand line: <%s>' % line)
-
-  return ret
-
-
-def get_unique(things):
-  if len(things) == 1:
-    return things[0]
-  elif len(things) == 0:
-    raise ValueError("Expected to get one thing, but dinna get none.")
-  else:
-    logging.warn('Expected to get one thing, but got a bunch: %s\n%s' %
-                 (things, traceback.format_stack()))
-    return things[0]
-
-
-def _subprocess_call(argv, **kwargs):
-  logging.info('Running %r', argv)
-  return subprocess.call(argv, **kwargs)
-
-def _subprocess_check_call(argv, **kwargs):
-  logging.info('Running %r', argv)
-  subprocess.check_call(argv, **kwargs)
-
-
-def main():
-  if '--verbose' in sys.argv:
-    logging.getLogger().setLevel(logging.INFO)
-
-  if sys.platform.startswith(('win', 'cygwin')):
-    git = 'git.bat'
-  else:
-    git = 'git'
-
-  # Find the repository and config file to operate on.
-  repo_root = os.path.abspath(
-      os.path.join(os.path.dirname(__file__), REPO_ROOT))
-  recipes_cfg_path = os.path.join(repo_root, RECIPES_CFG)
-
-  with open(recipes_cfg_path, 'rU') as fh:
-    protobuf = parse_protobuf(fh)
-
-  engine_buf = get_unique([
-      b for b in protobuf['deps'] if b.get('project_id') == ['recipe_engine'] ])
-  engine_url = get_unique(engine_buf['url'])
-  engine_revision = get_unique(engine_buf['revision'])
-  engine_subpath = (get_unique(engine_buf.get('path_override', ['']))
-                    .replace('/', os.path.sep))
-
-  recipes_path = os.path.join(repo_root,
-      get_unique(protobuf['recipes_path']).replace('/', os.path.sep))
-  deps_path = os.path.join(recipes_path, '.recipe_deps')
-  engine_path = os.path.join(deps_path, 'recipe_engine')
-
-  # Ensure that we have the recipe engine cloned.
-  def ensure_engine():
-    if not os.path.exists(deps_path):
-      os.makedirs(deps_path)
-    if not os.path.exists(engine_path):
-      _subprocess_check_call([git, 'clone', engine_url, engine_path])
-
-    needs_fetch = _subprocess_call(
-        [git, 'rev-parse', '--verify', '%s^{commit}' % engine_revision],
-        cwd=engine_path, stdout=open(os.devnull, 'w'))
-    if needs_fetch:
-      _subprocess_check_call([git, 'fetch'], cwd=engine_path)
-    _subprocess_check_call(
-        [git, 'checkout', '--quiet', engine_revision], cwd=engine_path)
-
-  try:
-    ensure_engine()
-  except subprocess.CalledProcessError:
-    logging.exception('ensure_engine failed')
-
-    # Retry errors.
-    time.sleep(random.uniform(2,5))
-    ensure_engine()
-
-  args = ['--package', recipes_cfg_path] + sys.argv[1:]
-  return _subprocess_call([
-      sys.executable, '-u',
-      os.path.join(engine_path, engine_subpath, 'recipes.py')] + args)
-
-if __name__ == '__main__':
-  sys.exit(main())
diff --git a/infra/recipes/jiri.expected/ci.json b/infra/recipes/jiri.expected/ci.json
deleted file mode 100644
index 032c0ba..0000000
--- a/infra/recipes/jiri.expected/ci.json
+++ /dev/null
@@ -1,195 +0,0 @@
-[
-  {
-    "cmd": [],
-    "name": "ensure_jiri"
-  },
-  {
-    "cmd": [
-      "python",
-      "-u",
-      "RECIPE_MODULE[infra::cipd]/resources/bootstrap.py",
-      "--platform",
-      "linux-amd64",
-      "--dest-directory",
-      "[START_DIR]/cipd",
-      "--json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_jiri.install cipd",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_TEXT@cipd version: git_revision:05844bd9d1200cba8449b936b76e25eb90eabe25@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"executable\": \"[START_DIR]/cipd/cipd\", @@@",
-      "@@@STEP_LOG_LINE@json.output@  \"version\": \"git_revision:05844bd9d1200cba8449b936b76e25eb90eabe25\"@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/cipd",
-      "ensure",
-      "--root",
-      "[START_DIR]/cipd/jiri",
-      "--list",
-      "fuchsia/tools/jiri/linux-amd64 latest",
-      "--json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_jiri.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@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\": \"fuchsia/tools/jiri/linux-amd64\"@@@",
-      "@@@STEP_LOG_LINE@json.output@    }@@@",
-      "@@@STEP_LOG_LINE@json.output@  ]@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/jiri/jiri",
-      "init",
-      "-cache",
-      "[CACHE]/git"
-    ],
-    "name": "jiri init"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/jiri/jiri",
-      "project",
-      "clean"
-    ],
-    "name": "jiri project clean"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/jiri/jiri",
-      "import",
-      "jiri",
-      "https://fuchsia.googlesource.com/manifest"
-    ],
-    "name": "jiri import"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/jiri/jiri",
-      "update",
-      "-autoupdate=false",
-      "-gc=true"
-    ],
-    "name": "jiri update"
-  },
-  {
-    "cmd": [],
-    "name": "ensure_go"
-  },
-  {
-    "cmd": [
-      "python",
-      "-u",
-      "RECIPE_MODULE[infra::cipd]/resources/bootstrap.py",
-      "--platform",
-      "linux-amd64",
-      "--dest-directory",
-      "[START_DIR]/cipd",
-      "--json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_go.install cipd",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_TEXT@cipd version: git_revision:05844bd9d1200cba8449b936b76e25eb90eabe25@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"executable\": \"[START_DIR]/cipd/cipd\", @@@",
-      "@@@STEP_LOG_LINE@json.output@  \"version\": \"git_revision:05844bd9d1200cba8449b936b76e25eb90eabe25\"@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/cipd",
-      "ensure",
-      "--root",
-      "[START_DIR]/cipd/go",
-      "--list",
-      "fuchsia/go/go/linux-amd64 release",
-      "--json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_go.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@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-release---------\", @@@",
-      "@@@STEP_LOG_LINE@json.output@      \"package\": \"fuchsia/go/go/linux-amd64\"@@@",
-      "@@@STEP_LOG_LINE@json.output@    }@@@",
-      "@@@STEP_LOG_LINE@json.output@  ]@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "git",
-      "show",
-      "HEAD",
-      "--format=%H",
-      "-s"
-    ],
-    "cwd": "[START_DIR]/go/src/fuchsia.googlesource.com/jiri",
-    "name": "git show",
-    "stdout": "/path/to/tmp/"
-  },
-  {
-    "cmd": [
-      "date",
-      "--rfc-3339=seconds"
-    ],
-    "name": "date",
-    "stdout": "/path/to/tmp/"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/go/bin/go",
-      "build",
-      "-ldflags",
-      "-X \"fuchsia.googlesource.com/jiri/version.GitCommit=deadbeef\" -X \"fuchsia.googlesource.com/jiri/version.BuildTime=2016-10-11 14:40:25-07:00\"",
-      "-a",
-      "fuchsia.googlesource.com/jiri/cmd/jiri"
-    ],
-    "env": {
-      "GOARCH": "amd64",
-      "GOOS": "linux",
-      "GOPATH": "[START_DIR]/go",
-      "GOROOT": "[START_DIR]/cipd/go"
-    },
-    "name": "go build"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/go/bin/go",
-      "test",
-      "fuchsia.googlesource.com/jiri/cmd/jiri"
-    ],
-    "env": {
-      "GOPATH": "[START_DIR]/go",
-      "GOROOT": "[START_DIR]/cipd/go"
-    },
-    "name": "go test"
-  },
-  {
-    "name": "$result",
-    "recipe_result": null,
-    "status_code": 0
-  }
-]
\ No newline at end of file
diff --git a/infra/recipes/jiri.expected/cq_try.json b/infra/recipes/jiri.expected/cq_try.json
deleted file mode 100644
index c0bcaaa..0000000
--- a/infra/recipes/jiri.expected/cq_try.json
+++ /dev/null
@@ -1,205 +0,0 @@
-[
-  {
-    "cmd": [],
-    "name": "ensure_jiri"
-  },
-  {
-    "cmd": [
-      "python",
-      "-u",
-      "RECIPE_MODULE[infra::cipd]/resources/bootstrap.py",
-      "--platform",
-      "linux-amd64",
-      "--dest-directory",
-      "[START_DIR]/cipd",
-      "--json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_jiri.install cipd",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_TEXT@cipd version: git_revision:05844bd9d1200cba8449b936b76e25eb90eabe25@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"executable\": \"[START_DIR]/cipd/cipd\", @@@",
-      "@@@STEP_LOG_LINE@json.output@  \"version\": \"git_revision:05844bd9d1200cba8449b936b76e25eb90eabe25\"@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/cipd",
-      "ensure",
-      "--root",
-      "[START_DIR]/cipd/jiri",
-      "--list",
-      "fuchsia/tools/jiri/linux-amd64 latest",
-      "--json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_jiri.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@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\": \"fuchsia/tools/jiri/linux-amd64\"@@@",
-      "@@@STEP_LOG_LINE@json.output@    }@@@",
-      "@@@STEP_LOG_LINE@json.output@  ]@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/jiri/jiri",
-      "init",
-      "-cache",
-      "[CACHE]/git"
-    ],
-    "name": "jiri init"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/jiri/jiri",
-      "project",
-      "clean"
-    ],
-    "name": "jiri project clean"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/jiri/jiri",
-      "import",
-      "jiri",
-      "https://fuchsia.googlesource.com/manifest"
-    ],
-    "name": "jiri import"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/jiri/jiri",
-      "update",
-      "-autoupdate=false",
-      "-gc=true"
-    ],
-    "name": "jiri update"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/jiri/jiri",
-      "patch",
-      "-host",
-      "fuchsia-review.googlesource.com",
-      "refs/changes/89/456789/12"
-    ],
-    "name": "jiri patch"
-  },
-  {
-    "cmd": [],
-    "name": "ensure_go"
-  },
-  {
-    "cmd": [
-      "python",
-      "-u",
-      "RECIPE_MODULE[infra::cipd]/resources/bootstrap.py",
-      "--platform",
-      "linux-amd64",
-      "--dest-directory",
-      "[START_DIR]/cipd",
-      "--json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_go.install cipd",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_TEXT@cipd version: git_revision:05844bd9d1200cba8449b936b76e25eb90eabe25@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"executable\": \"[START_DIR]/cipd/cipd\", @@@",
-      "@@@STEP_LOG_LINE@json.output@  \"version\": \"git_revision:05844bd9d1200cba8449b936b76e25eb90eabe25\"@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/cipd",
-      "ensure",
-      "--root",
-      "[START_DIR]/cipd/go",
-      "--list",
-      "fuchsia/go/go/linux-amd64 release",
-      "--json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "ensure_go.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@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-release---------\", @@@",
-      "@@@STEP_LOG_LINE@json.output@      \"package\": \"fuchsia/go/go/linux-amd64\"@@@",
-      "@@@STEP_LOG_LINE@json.output@    }@@@",
-      "@@@STEP_LOG_LINE@json.output@  ]@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "git",
-      "show",
-      "HEAD",
-      "--format=%H",
-      "-s"
-    ],
-    "cwd": "[START_DIR]/go/src/fuchsia.googlesource.com/jiri",
-    "name": "git show",
-    "stdout": "/path/to/tmp/"
-  },
-  {
-    "cmd": [
-      "date",
-      "--rfc-3339=seconds"
-    ],
-    "name": "date",
-    "stdout": "/path/to/tmp/"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/go/bin/go",
-      "build",
-      "-ldflags",
-      "-X \"fuchsia.googlesource.com/jiri/version.GitCommit=deadbeef\" -X \"fuchsia.googlesource.com/jiri/version.BuildTime=2016-10-11 14:40:25-07:00\"",
-      "-a",
-      "fuchsia.googlesource.com/jiri/cmd/jiri"
-    ],
-    "env": {
-      "GOARCH": "amd64",
-      "GOOS": "linux",
-      "GOPATH": "[START_DIR]/go",
-      "GOROOT": "[START_DIR]/cipd/go"
-    },
-    "name": "go build"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd/go/bin/go",
-      "test",
-      "fuchsia.googlesource.com/jiri/cmd/jiri"
-    ],
-    "env": {
-      "GOPATH": "[START_DIR]/go",
-      "GOROOT": "[START_DIR]/cipd/go"
-    },
-    "name": "go test"
-  },
-  {
-    "name": "$result",
-    "recipe_result": null,
-    "status_code": 0
-  }
-]
\ No newline at end of file
diff --git a/infra/recipes/jiri.py b/infra/recipes/jiri.py
deleted file mode 100644
index 60c0aa2..0000000
--- a/infra/recipes/jiri.py
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 2016 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Recipe for building Jiri."""
-
-from recipe_engine.recipe_api import Property
-from recipe_engine import config
-
-
-DEPS = [
-    'infra/jiri',
-    'infra/git',
-    'infra/go',
-    'recipe_engine/path',
-    'recipe_engine/properties',
-    'recipe_engine/raw_io',
-    'recipe_engine/step',
-]
-
-PROPERTIES = {
-    'category': Property(kind=str, help='Build category', default=None),
-    'patch_gerrit_url': Property(kind=str, help='Gerrit host', default=None),
-    'patch_project': Property(kind=str, help='Gerrit project', default=None),
-    'patch_ref': Property(kind=str, help='Gerrit patch ref', default=None),
-    'patch_storage': Property(kind=str, help='Patch location', default=None),
-    'patch_repository_url': Property(kind=str, help='URL to a Git repository',
-                              default=None),
-    'manifest': Property(kind=str, help='Jiri manifest to use'),
-    'remote': Property(kind=str, help='Remote manifest repository'),
-    'target': Property(kind=str, help='Target to build'),
-}
-
-
-def RunSteps(api, category, patch_gerrit_url, patch_project, patch_ref,
-             patch_storage, patch_repository_url, manifest, remote, target):
-    api.jiri.ensure_jiri()
-
-    api.jiri.init()
-    api.jiri.clean_project()
-    api.jiri.import_manifest(manifest, remote)
-    api.jiri.update(gc=True)
-    if patch_ref is not None:
-        api.jiri.patch(patch_ref, host=patch_gerrit_url)
-
-    api.go.ensure_go()
-
-    gitdir = api.path['start_dir'].join(
-        'go', 'src', 'fuchsia.googlesource.com', 'jiri')
-    git_commit = api.git.get_hash(cwd=gitdir)
-    result = api.step('date', ['date', '--rfc-3339=seconds'],
-        stdout=api.raw_io.output(),
-        step_test_data=lambda:
-            api.raw_io.test_api.stream_output('2016-10-11 14:40:25-07:00'))
-    build_time = result.stdout.strip()
-
-    ldflags = "-X \"fuchsia.googlesource.com/jiri/version.GitCommit=%s\" -X \"fuchsia.googlesource.com/jiri/version.BuildTime=%s\"" % (git_commit, build_time)
-    gopath = api.path['start_dir'].join('go')
-    goos, goarch = target.split("-", 2)
-
-    with api.step.context({'env': {'GOPATH': gopath, 'GOOS': goos, 'GOARCH': goarch}}):
-        api.go('build', '-ldflags', ldflags, '-a',
-               'fuchsia.googlesource.com/jiri/cmd/jiri')
-
-    with api.step.context({'env': {'GOPATH': gopath}}):
-        api.go('test', 'fuchsia.googlesource.com/jiri/cmd/jiri')
-
-
-def GenTests(api):
-    yield api.test('ci') + api.properties(
-        manifest='jiri',
-        remote='https://fuchsia.googlesource.com/manifest',
-        target='linux-amd64',
-    )
-    yield api.test('cq_try') + api.properties.tryserver(
-        gerrit_project='jiri',
-        patch_gerrit_url='fuchsia-review.googlesource.com',
-        manifest='jiri',
-        remote='https://fuchsia.googlesource.com/manifest',
-        target='linux-amd64',
-    )