Copy configs from infra/config branch.

Also adds some documentation and updates OWNERS.

Bug: 833848
Change-Id: I1e9adf9b84a776efceb5a529a73310f515e50c70
Reviewed-on: https://chromium-review.googlesource.com/c/1330681
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/infra/config/OWNERS b/infra/config/OWNERS
index 4cada3d..148b682 100644
--- a/infra/config/OWNERS
+++ b/infra/config/OWNERS
@@ -2,3 +2,5 @@
 phajdan.jr@chromium.org
 sergiyb@chromium.org
 tandrii@chromium.org
+jmadill@chromium.org
+
diff --git a/infra/config/README.md b/infra/config/README.md
index a46a2e7..8aae5da 100644
--- a/infra/config/README.md
+++ b/infra/config/README.md
@@ -1 +1,27 @@
-This directory contains configuration files for chrome infrastructure services.
+## Configurations files for chrome-infra services.
+
+There are two kinds of configs: **global** and **ref-specific**.
+
+
+## Global configs.
+
+Apply to the whole repo regardless of the ref (branch).
+
+Located in [global](global) directory.
+
+Currently active version can be checked at
+https://luci-config.appspot.com/#/projects/angle .
+
+
+## Ref-specific configs.
+
+Apply only to a ref(branch) they are located in.
+
+Located in [branch](branch) directory.
+
+Currently active version can be checked at
+
+    https://luci-config.appspot.com/#/projects/angle/<ref>
+    # For example, for master branch:
+    #   https://luci-config.appspot.com/#/projects/angle/refs/heads/master
+
diff --git a/infra/config/branch/OWNERS b/infra/config/branch/OWNERS
new file mode 100644
index 0000000..fcb59a1
--- /dev/null
+++ b/infra/config/branch/OWNERS
@@ -0,0 +1,5 @@
+geofflang@chromium.org
+phajdan.jr@chromium.org
+sergiyb@chromium.org
+tandrii@chromium.org
+jmadill@chromium.org
diff --git a/infra/config/branch/README.md b/infra/config/branch/README.md
new file mode 100644
index 0000000..a46a2e7
--- /dev/null
+++ b/infra/config/branch/README.md
@@ -0,0 +1 @@
+This directory contains configuration files for chrome infrastructure services.
diff --git a/infra/config/cq.cfg b/infra/config/branch/cq.cfg
similarity index 100%
rename from infra/config/cq.cfg
rename to infra/config/branch/cq.cfg
diff --git a/infra/config/global/OWNERS b/infra/config/global/OWNERS
new file mode 100644
index 0000000..148b682
--- /dev/null
+++ b/infra/config/global/OWNERS
@@ -0,0 +1,6 @@
+geofflang@chromium.org
+phajdan.jr@chromium.org
+sergiyb@chromium.org
+tandrii@chromium.org
+jmadill@chromium.org
+
diff --git a/infra/config/global/README.md b/infra/config/global/README.md
new file mode 100644
index 0000000..cbccc96
--- /dev/null
+++ b/infra/config/global/README.md
@@ -0,0 +1,14 @@
+## Global configs.
+
+**IMPORTANT:** If you see this in a branch which is not `master`,
+**this directory has no effect and should be ignored.**
+
+This branch contains ANGLE project-wide configurations
+for chrome-infra services.
+For example, [cr-buildbucket.cfg](cr-buildbucket.cfg) defines builders.
+
+**Remember** Change these configs on `master` branch only!
+
+Currently active version can be checked at
+https://luci-config.appspot.com/#/projects/angle .
+
diff --git a/infra/config/global/cr-buildbucket.cfg b/infra/config/global/cr-buildbucket.cfg
new file mode 100644
index 0000000..b2bfd6c
--- /dev/null
+++ b/infra/config/global/cr-buildbucket.cfg
@@ -0,0 +1,371 @@
+# Defines buckets on cr-buildbucket.appspot.com, used to schedule builds
+# on buildbot. In particular, CQ uses some of these buckets to schedule tryjobs.
+#
+# See http://luci-config.appspot.com/schemas/projects:cr-buildbucket.cfg for
+# schema of this file and documentation.
+#
+# Please keep this list sorted by bucket name.
+
+acl_sets {
+  name: "ci"
+  acls {
+    role: READER
+    group: "all"
+  }
+  acls {
+    role: SCHEDULER
+    identity: "luci-scheduler@appspot.gserviceaccount.com"
+  }
+  acls {
+    role: SCHEDULER
+    identity: "angle-ci-builder@chops-service-accounts.iam.gserviceaccount.com"
+  }
+}
+
+acl_sets {
+  name: "try"
+  acls {
+    role: READER
+    group: "all"
+  }
+  acls {
+    role: SCHEDULER
+    group: "project-angle-tryjob-access"
+  }
+  acls {
+    role: SCHEDULER
+    group: "service-account-cq"
+  }
+}
+
+builder_mixins {
+  name: "linux"
+  dimensions: "os:Ubuntu-14.04"
+}
+
+builder_mixins {
+  name: "win"
+  dimensions: "os:Windows"
+}
+
+builder_mixins {
+  name: "mac"
+  dimensions: "os:Mac"
+}
+
+builder_mixins {
+  name: "clang"
+  recipe {
+    properties_j: "clang:true"
+  }
+}
+
+builder_mixins {
+  name: "no_clang"
+  recipe {
+    properties_j: "clang:false"
+  }
+}
+
+builder_mixins {
+  name: "rel"
+  recipe {
+    properties_j: "debug:false"
+  }
+}
+
+builder_mixins {
+  name: "dbg"
+  recipe {
+    properties_j: "debug:true"
+  }
+}
+
+builder_mixins {
+  name: "x86"
+  recipe {
+    properties: "target_cpu:x86"
+  }
+}
+
+builder_mixins {
+  name: "x64"
+  recipe {
+    properties: "target_cpu:x64"
+  }
+}
+
+buckets {
+  name: "luci.angle.ci"
+  acl_sets: "ci"
+
+  swarming {
+    hostname: "chromium-swarm.appspot.com"
+
+    builder_defaults {
+      recipe: {
+        cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"
+        cipd_version: "refs/heads/master"
+        name: "angle"
+      }
+      build_numbers: YES
+      service_account: "angle-ci-builder@chops-service-accounts.iam.gserviceaccount.com"
+
+      caches {
+        path: "win_toolchain"
+        name: "win_toolchain"
+      }
+    }
+
+    builders {
+      name: "linux-clang-dbg"
+      mixins: "linux"
+      mixins: "clang"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "linux-clang-rel"
+      mixins: "linux"
+      mixins: "clang"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "linux-gcc-dbg"
+      mixins: "linux"
+      mixins: "no_clang"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "linux-gcc-rel"
+      mixins: "linux"
+      mixins: "no_clang"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "mac-dbg"
+      mixins: "mac"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "mac-rel"
+      mixins: "mac"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "win-msvc-x86-dbg"
+      mixins: "win"
+      mixins: "no_clang"
+      mixins: "x86"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "win-msvc-x86-rel"
+      mixins: "win"
+      mixins: "no_clang"
+      mixins: "x86"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "win-msvc-x64-dbg"
+      mixins: "win"
+      mixins: "no_clang"
+      mixins: "x64"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "win-msvc-x64-rel"
+      mixins: "win"
+      mixins: "no_clang"
+      mixins: "x64"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "win-clang-x86-dbg"
+      mixins: "win"
+      mixins: "clang"
+      mixins: "x86"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "win-clang-x86-rel"
+      mixins: "win"
+      mixins: "clang"
+      mixins: "x86"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "win-clang-x64-dbg"
+      mixins: "win"
+      mixins: "clang"
+      mixins: "x64"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "win-clang-x64-rel"
+      mixins: "win"
+      mixins: "clang"
+      mixins: "x64"
+      mixins: "rel"
+    }
+  }
+}
+
+# Note that many angle trybots are defined in the luci.chromium.try bucket
+# over in chromium.
+buckets {
+  name: "luci.angle.try"
+  acl_sets: "try"
+
+  swarming {
+    hostname: "chromium-swarm.appspot.com"
+
+    builder_defaults {
+      recipe: {
+        cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"
+        cipd_version: "refs/heads/master"
+        name: "angle"
+        properties_j: "$depot_tools/bot_update:{\"apply_patch_on_gclient\":true}"
+      }
+      build_numbers: YES
+      service_account: "angle-try-builder@chops-service-accounts.iam.gserviceaccount.com"
+
+      caches {
+        path: "win_toolchain"
+        name: "win_toolchain"
+      }
+    }
+
+    builders {
+      name: "linux-clang-dbg"
+      mixins: "linux"
+      mixins: "clang"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "linux-clang-rel"
+      mixins: "linux"
+      mixins: "clang"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "linux-gcc-dbg"
+      mixins: "linux"
+      mixins: "no_clang"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "linux-gcc-rel"
+      mixins: "linux"
+      mixins: "no_clang"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "mac-dbg"
+      mixins: "mac"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "mac-rel"
+      mixins: "mac"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "win-msvc-x86-dbg"
+      mixins: "win"
+      mixins: "no_clang"
+      mixins: "x86"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "win-msvc-x86-rel"
+      mixins: "win"
+      mixins: "no_clang"
+      mixins: "x86"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "win-msvc-x64-dbg"
+      mixins: "win"
+      mixins: "no_clang"
+      mixins: "x64"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "win-msvc-x64-rel"
+      mixins: "win"
+      mixins: "no_clang"
+      mixins: "x64"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "win-clang-x86-dbg"
+      mixins: "win"
+      mixins: "clang"
+      mixins: "x86"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "win-clang-x86-rel"
+      mixins: "win"
+      mixins: "clang"
+      mixins: "x86"
+      mixins: "rel"
+    }
+
+    builders {
+      name: "win-clang-x64-dbg"
+      mixins: "win"
+      mixins: "clang"
+      mixins: "x64"
+      mixins: "dbg"
+    }
+
+    builders {
+      name: "win-clang-x64-rel"
+      mixins: "win"
+      mixins: "clang"
+      mixins: "x64"
+      mixins: "rel"
+    }
+  }
+}
+
+buckets {
+  name: "master.tryserver.chromium.angle"
+  acls {
+    role: READER
+    group: "all"
+  }
+  acls {
+    role: SCHEDULER
+    group: "project-angle-tryjob-access"
+  }
+  acls {
+    role: WRITER
+    group: "service-account-chromium-tryserver"
+  }
+}
diff --git a/infra/config/global/luci-logdog.cfg b/infra/config/global/luci-logdog.cfg
new file mode 100644
index 0000000..ee321e6
--- /dev/null
+++ b/infra/config/global/luci-logdog.cfg
@@ -0,0 +1,10 @@
+# See http://luci-config.appspot.com/schemas/services/luci-logdog:logdog.cfg
+# for schema of this file and documentation.
+
+reader_auth_groups: "all"
+writer_auth_groups: "luci-logdog-angle-writers"
+
+# The base Google Storage archival path for this project.
+#
+# Archived LogDog logs will be written to this bucket/path.
+archive_gs_bucket: "chromium-luci-logdog"
diff --git a/infra/config/global/luci-milo.cfg b/infra/config/global/luci-milo.cfg
new file mode 100644
index 0000000..0a40e9b
--- /dev/null
+++ b/infra/config/global/luci-milo.cfg
@@ -0,0 +1,162 @@
+# See http://luci-config.appspot.com/schemas/projects:luci-milo.cfg for
+# schema of this file and documentation.
+
+logo_url: "https://storage.googleapis.com/chrome-infra/OpenGL%20ES_RGB_June16.svg"
+
+consoles {
+  id: "ci"
+  name: "ANGLE CI builders"
+  repo_url: "https://chromium.googlesource.com/angle/angle"
+  refs: "refs/heads/master"
+  manifest_name: "REVISION"
+
+  builders {
+    name: "buildbucket/luci.angle.ci/linux-clang-dbg"
+    category: "linux|clang"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/linux-clang-rel"
+    category: "linux|clang"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/linux-gcc-dbg"
+    category: "linux|gcc"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/linux-gcc-rel"
+    category: "linux|gcc"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/mac-dbg"
+    category: "mac"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/mac-rel"
+    category: "mac"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/win-clang-x86-dbg"
+    category: "win|clang|x86"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/win-clang-x86-rel"
+    category: "win|clang|x86"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/win-clang-x64-dbg"
+    category: "win|clang|x64"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/win-clang-x64-rel"
+    category: "win|clang|x64"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/win-msvc-x86-dbg"
+    category: "win|msvc|x86"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/win-msvc-x86-rel"
+    category: "win|msvc|x86"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/win-msvc-x64-dbg"
+    category: "win|msvc|x64"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.ci/win-msvc-x64-rel"
+    category: "win|msvc|x64"
+    short_name: "rel"
+  }
+}
+
+consoles {
+  id: "try"
+  name: "ANGLE try builders"
+  repo_url: "https://chromium.googlesource.com/angle/angle"
+  refs: "refs/heads/master"
+  manifest_name: "PATCHED"
+
+  builders {
+    name: "buildbucket/luci.angle.try/linux-clang-dbg"
+    category: "linux|clang"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/linux-clang-rel"
+    category: "linux|clang"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/linux-gcc-dbg"
+    category: "linux|gcc"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/linux-gcc-rel"
+    category: "linux|gcc"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/mac-dbg"
+    category: "mac"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/mac-rel"
+    category: "mac"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/win-clang-x86-dbg"
+    category: "mac|clang|x86"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/win-clang-x86-rel"
+    category: "win|clang|x86"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/win-clang-x64-dbg"
+    category: "win|clang|x64"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/win-clang-x64-rel"
+    category: "win|clang|x64"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/win-msvc-x86-dbg"
+    category: "win|msvc|x86"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/win-msvc-x86-rel"
+    category: "win|msvc|x86"
+    short_name: "rel"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/win-msvc-x64-dbg"
+    category: "win|msvc|x64"
+    short_name: "dbg"
+  }
+  builders {
+    name: "buildbucket/luci.angle.try/win-msvc-x64-rel"
+    category: "win|msvc|x64"
+    short_name: "rel"
+  }
+}
diff --git a/infra/config/global/luci-scheduler.cfg b/infra/config/global/luci-scheduler.cfg
new file mode 100644
index 0000000..de91353
--- /dev/null
+++ b/infra/config/global/luci-scheduler.cfg
@@ -0,0 +1,182 @@
+# Defines jobs on luci-scheduler.appspot.com.
+#
+# For schema of this file and documentation see ProjectConfig message in
+#
+# https://chromium.googlesource.com/infra/luci/luci-go/+/master/scheduler/appengine/messages/cron.proto
+
+acl_sets {
+  name: "default"
+  acls {
+    role: READER
+    granted_to: "group:all"
+  }
+  acls {
+    role: OWNER
+    granted_to: "group:project-angle-admins"
+  }
+}
+
+trigger {
+  id: "master-gitiles-trigger"
+  acl_sets: "default"
+
+  gitiles {
+    repo: "https://chromium.googlesource.com/angle/angle.git"
+    refs: "refs/heads/master"
+  }
+
+  triggers: "linux-clang-dbg"
+  triggers: "linux-clang-rel"
+  triggers: "linux-gcc-dbg"
+  triggers: "linux-gcc-rel"
+  triggers: "mac-dbg"
+  triggers: "mac-rel"
+  triggers: "win-clang-x86-dbg"
+  triggers: "win-clang-x86-rel"
+  triggers: "win-clang-x64-dbg"
+  triggers: "win-clang-x64-rel"
+  triggers: "win-msvc-x86-dbg"
+  triggers: "win-msvc-x86-rel"
+  triggers: "win-msvc-x64-dbg"
+  triggers: "win-msvc-x64-rel"
+}
+
+job {
+  id: "linux-clang-dbg"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "linux-clang-dbg"
+  }
+}
+
+job {
+  id: "linux-clang-rel"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "linux-clang-rel"
+  }
+}
+
+job {
+  id: "linux-gcc-dbg"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "linux-gcc-dbg"
+  }
+}
+
+job {
+  id: "linux-gcc-rel"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "linux-gcc-rel"
+  }
+}
+
+job {
+  id: "mac-dbg"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "mac-dbg"
+  }
+}
+
+job {
+  id: "mac-rel"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "mac-rel"
+  }
+}
+
+job {
+  id: "win-clang-x86-dbg"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "win-clang-x86-dbg"
+  }
+}
+
+job {
+  id: "win-clang-x86-rel"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "win-clang-x86-rel"
+  }
+}
+
+job {
+  id: "win-clang-x64-dbg"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "win-clang-x64-dbg"
+  }
+}
+
+job {
+  id: "win-clang-x64-rel"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "win-clang-x64-rel"
+  }
+}
+
+job {
+  id: "win-msvc-x86-dbg"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "win-msvc-x86-dbg"
+  }
+}
+
+job {
+  id: "win-msvc-x86-rel"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "win-msvc-x86-rel"
+  }
+}
+
+job {
+  id: "win-msvc-x64-dbg"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "win-msvc-x64-dbg"
+  }
+}
+
+job {
+  id: "win-msvc-x64-rel"
+  acl_sets: "default"
+  buildbucket: {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "luci.angle.ci"
+    builder: "win-msvc-x64-rel"
+  }
+}
diff --git a/infra/config/global/project.cfg b/infra/config/global/project.cfg
new file mode 100644
index 0000000..e266c98
--- /dev/null
+++ b/infra/config/global/project.cfg
@@ -0,0 +1,4 @@
+# For the schema of this file and documentation, see ProjectCfg message in
+# https://luci-config.appspot.com/schemas/projects:project.cfg
+name: "angle"
+access: "group:all" # public