Make buildbotless trybots only support Gerrit
authorskia.buildbots <skia.buildbots@gmail.com>
Fri, 4 Nov 2016 18:37:26 +0000 (14:37 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Fri, 4 Nov 2016 22:09:21 +0000 (22:09 +0000)
BUG=skia:5723

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4460

Change-Id: Ia5630de72f8b473551a5357fdf50eb3dd288b9a7
Reviewed-on: https://skia-review.googlesource.com/4460
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

infra/bots/gen_tasks.go
infra/bots/recipe_modules/core/api.py
infra/bots/tasks.json

index 6c12dbb81f89cacf50db1e39f8b1087cb7da1130..2ad8e542915b48a286bc2b89d71fe9a821f0bf41 100644 (file)
@@ -215,7 +215,7 @@ func compile(b *specs.TasksCfgBuilder, name string, parts map[string]string) str
                Dimensions:   swarmDimensions(parts),
                ExtraArgs: []string{
                        "--workdir", "../../..", "swarm_compile",
-                       "repository=skia",
+                       fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO),
                        fmt.Sprintf("buildername=%s", name),
                        "mastername=fake-master",
                        "buildnumber=2",
@@ -224,9 +224,8 @@ func compile(b *specs.TasksCfgBuilder, name string, parts map[string]string) str
                        fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR),
                        fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION),
                        fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE),
-                       fmt.Sprintf("rietveld=%s", specs.PLACEHOLDER_CODEREVIEW_SERVER),
-                       fmt.Sprintf("issue=%s", specs.PLACEHOLDER_ISSUE),
-                       fmt.Sprintf("patchset=%s", specs.PLACEHOLDER_PATCHSET),
+                       fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE),
+                       fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET),
                },
                Isolate:  "compile_skia.isolate",
                Priority: 0.8,
@@ -264,7 +263,7 @@ func infra(b *specs.TasksCfgBuilder, name string) string {
                Dimensions:   UPLOAD_DIMENSIONS,
                ExtraArgs: []string{
                        "--workdir", "../../..", "swarm_infra",
-                       "repository=skia",
+                       fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO),
                        fmt.Sprintf("buildername=%s", name),
                        "mastername=fake-master",
                        "buildnumber=2",
@@ -273,9 +272,8 @@ func infra(b *specs.TasksCfgBuilder, name string) string {
                        fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR),
                        fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION),
                        fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE),
-                       fmt.Sprintf("rietveld=%s", specs.PLACEHOLDER_CODEREVIEW_SERVER),
-                       fmt.Sprintf("issue=%s", specs.PLACEHOLDER_ISSUE),
-                       fmt.Sprintf("patchset=%s", specs.PLACEHOLDER_PATCHSET),
+                       fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE),
+                       fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET),
                },
                Isolate:  "infra_skia.isolate",
                Priority: 0.8,
@@ -310,7 +308,7 @@ func test(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
                Dimensions:   swarmDimensions(parts),
                ExtraArgs: []string{
                        "--workdir", "../../..", "swarm_test",
-                       "repository=skia",
+                       fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO),
                        fmt.Sprintf("buildername=%s", name),
                        "mastername=fake-master",
                        "buildnumber=2",
@@ -319,9 +317,8 @@ func test(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
                        fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR),
                        fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION),
                        fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE),
-                       fmt.Sprintf("rietveld=%s", specs.PLACEHOLDER_CODEREVIEW_SERVER),
-                       fmt.Sprintf("issue=%s", specs.PLACEHOLDER_ISSUE),
-                       fmt.Sprintf("patchset=%s", specs.PLACEHOLDER_PATCHSET),
+                       fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE),
+                       fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET),
                },
                Isolate:  "test_skia.isolate",
                Priority: 0.8,
@@ -334,7 +331,7 @@ func test(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
                        Dimensions:   UPLOAD_DIMENSIONS,
                        ExtraArgs: []string{
                                "--workdir", "../../..", "upload_dm_results",
-                               "repository=skia",
+                               fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO),
                                fmt.Sprintf("buildername=%s", name),
                                "mastername=fake-master",
                                "buildnumber=2",
@@ -343,9 +340,8 @@ func test(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
                                fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR),
                                fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION),
                                fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE),
-                               fmt.Sprintf("rietveld=%s", specs.PLACEHOLDER_CODEREVIEW_SERVER),
-                               fmt.Sprintf("issue=%s", specs.PLACEHOLDER_ISSUE),
-                               fmt.Sprintf("patchset=%s", specs.PLACEHOLDER_PATCHSET),
+                               fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE),
+                               fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET),
                        },
                        Isolate:  "upload_dm_results.isolate",
                        Priority: 0.8,
@@ -364,7 +360,7 @@ func perf(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
                Dimensions:   swarmDimensions(parts),
                ExtraArgs: []string{
                        "--workdir", "../../..", "swarm_perf",
-                       "repository=skia",
+                       fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO),
                        fmt.Sprintf("buildername=%s", name),
                        "mastername=fake-master",
                        "buildnumber=2",
@@ -373,9 +369,8 @@ func perf(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
                        fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR),
                        fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION),
                        fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE),
-                       fmt.Sprintf("rietveld=%s", specs.PLACEHOLDER_CODEREVIEW_SERVER),
-                       fmt.Sprintf("issue=%s", specs.PLACEHOLDER_ISSUE),
-                       fmt.Sprintf("patchset=%s", specs.PLACEHOLDER_PATCHSET),
+                       fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE),
+                       fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET),
                },
                Isolate:  "perf_skia.isolate",
                Priority: 0.8,
@@ -388,7 +383,7 @@ func perf(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
                        Dimensions:   UPLOAD_DIMENSIONS,
                        ExtraArgs: []string{
                                "--workdir", "../../..", "upload_nano_results",
-                               "repository=skia",
+                               fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO),
                                fmt.Sprintf("buildername=%s", name),
                                "mastername=fake-master",
                                "buildnumber=2",
@@ -397,9 +392,8 @@ func perf(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
                                fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR),
                                fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION),
                                fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE),
-                               fmt.Sprintf("rietveld=%s", specs.PLACEHOLDER_CODEREVIEW_SERVER),
-                               fmt.Sprintf("issue=%s", specs.PLACEHOLDER_ISSUE),
-                               fmt.Sprintf("patchset=%s", specs.PLACEHOLDER_PATCHSET),
+                               fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE),
+                               fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET),
                        },
                        Isolate:  "upload_nano_results.isolate",
                        Priority: 0.8,
index 5d4d7a3ccb57d63976ec8e3129e46e641f596069..c851ed49a5f52b2c41e78eed6ad46bc92d0d5c00 100644 (file)
@@ -113,6 +113,15 @@ class SkiaApi(recipe_api.RecipeApi):
     checkout_kwargs = {}
     checkout_kwargs['env'] = self.m.vars.default_env
 
+    # Hack the patch ref if necessary.
+    if self.m.properties.get('patch_storage', '') == 'gerrit':
+      if self.m.bot_update._issue and self.m.bot_update._patchset:
+        self.m.bot_update._gerrit_ref = 'refs/changes/%d/%d/%d' % (
+            int(str(self.m.bot_update._issue)[-2:]),
+            self.m.bot_update._issue,
+            self.m.bot_update._patchset,
+        )
+
     update_step = self.m.bot_update.ensure_checkout(
         gclient_config=gclient_cfg,
         cwd=self.m.vars.checkout_root,
index 06600aa6f4cc78d8e30a3c632409d787f6c7f42d..4730ea59ec3892371d750bce16688ff3d7c38c84 100644 (file)
@@ -60,7 +60,7 @@
         "--workdir",
         "../../..",
         "swarm_compile",
-        "repository=skia",
+        "repository=<(REPO)",
         "buildername=Build-Ubuntu-Clang-arm-Release-GN_Android",
         "mastername=fake-master",
         "buildnumber=2",
@@ -69,9 +69,8 @@
         "swarm_out_dir=${ISOLATED_OUTDIR}",
         "revision=<(REVISION)",
         "patch_storage=<(PATCH_STORAGE)",
-        "rietveld=<(CODEREVIEW_SERVER)",
-        "issue=<(ISSUE)",
-        "patchset=<(PATCHSET)"
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
       ],
       "isolate": "compile_skia.isolate",
       "priority": 0.8
@@ -86,7 +85,7 @@
         "--workdir",
         "../../..",
         "swarm_compile",
-        "repository=skia",
+        "repository=<(REPO)",
         "buildername=Build-Ubuntu-GCC-x86_64-Release-GN",
         "mastername=fake-master",
         "buildnumber=2",
@@ -95,9 +94,8 @@
         "swarm_out_dir=${ISOLATED_OUTDIR}",
         "revision=<(REVISION)",
         "patch_storage=<(PATCH_STORAGE)",
-        "rietveld=<(CODEREVIEW_SERVER)",
-        "issue=<(ISSUE)",
-        "patchset=<(PATCHSET)"
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
       ],
       "isolate": "compile_skia.isolate",
       "priority": 0.8
         "--workdir",
         "../../..",
         "swarm_compile",
-        "repository=skia",
+        "repository=<(REPO)",
         "buildername=Build-Win-Clang-arm64-Release-GN_Android",
         "mastername=fake-master",
         "buildnumber=2",
         "swarm_out_dir=${ISOLATED_OUTDIR}",
         "revision=<(REVISION)",
         "patch_storage=<(PATCH_STORAGE)",
-        "rietveld=<(CODEREVIEW_SERVER)",
-        "issue=<(ISSUE)",
-        "patchset=<(PATCHSET)"
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
       ],
       "isolate": "compile_skia.isolate",
       "priority": 0.8
         "--workdir",
         "../../..",
         "swarm_infra",
-        "repository=skia",
+        "repository=<(REPO)",
         "buildername=Housekeeper-PerCommit-InfraTests",
         "mastername=fake-master",
         "buildnumber=2",
         "swarm_out_dir=${ISOLATED_OUTDIR}",
         "revision=<(REVISION)",
         "patch_storage=<(PATCH_STORAGE)",
-        "rietveld=<(CODEREVIEW_SERVER)",
-        "issue=<(ISSUE)",
-        "patchset=<(PATCHSET)"
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
       ],
       "isolate": "infra_skia.isolate",
       "priority": 0.8
         "--workdir",
         "../../..",
         "swarm_perf",
-        "repository=skia",
+        "repository=<(REPO)",
         "buildername=Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-GN",
         "mastername=fake-master",
         "buildnumber=2",
         "swarm_out_dir=${ISOLATED_OUTDIR}",
         "revision=<(REVISION)",
         "patch_storage=<(PATCH_STORAGE)",
-        "rietveld=<(CODEREVIEW_SERVER)",
-        "issue=<(ISSUE)",
-        "patchset=<(PATCHSET)"
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
       ],
       "isolate": "perf_skia.isolate",
       "priority": 0.8
         "--workdir",
         "../../..",
         "swarm_test",
-        "repository=skia",
+        "repository=<(REPO)",
         "buildername=Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android",
         "mastername=fake-master",
         "buildnumber=2",
         "swarm_out_dir=${ISOLATED_OUTDIR}",
         "revision=<(REVISION)",
         "patch_storage=<(PATCH_STORAGE)",
-        "rietveld=<(CODEREVIEW_SERVER)",
-        "issue=<(ISSUE)",
-        "patchset=<(PATCHSET)"
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
       ],
       "isolate": "test_skia.isolate",
       "priority": 0.8
         "--workdir",
         "../../..",
         "swarm_test",
-        "repository=skia",
+        "repository=<(REPO)",
         "buildername=Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-GN",
         "mastername=fake-master",
         "buildnumber=2",
         "swarm_out_dir=${ISOLATED_OUTDIR}",
         "revision=<(REVISION)",
         "patch_storage=<(PATCH_STORAGE)",
-        "rietveld=<(CODEREVIEW_SERVER)",
-        "issue=<(ISSUE)",
-        "patchset=<(PATCHSET)"
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
       ],
       "isolate": "test_skia.isolate",
       "priority": 0.8
         "--workdir",
         "../../..",
         "upload_nano_results",
-        "repository=skia",
+        "repository=<(REPO)",
         "buildername=Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-GN",
         "mastername=fake-master",
         "buildnumber=2",
         "swarm_out_dir=${ISOLATED_OUTDIR}",
         "revision=<(REVISION)",
         "patch_storage=<(PATCH_STORAGE)",
-        "rietveld=<(CODEREVIEW_SERVER)",
-        "issue=<(ISSUE)",
-        "patchset=<(PATCHSET)"
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
       ],
       "isolate": "upload_nano_results.isolate",
       "priority": 0.8
         "--workdir",
         "../../..",
         "upload_dm_results",
-        "repository=skia",
+        "repository=<(REPO)",
         "buildername=Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android",
         "mastername=fake-master",
         "buildnumber=2",
         "swarm_out_dir=${ISOLATED_OUTDIR}",
         "revision=<(REVISION)",
         "patch_storage=<(PATCH_STORAGE)",
-        "rietveld=<(CODEREVIEW_SERVER)",
-        "issue=<(ISSUE)",
-        "patchset=<(PATCHSET)"
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
       ],
       "isolate": "upload_dm_results.isolate",
       "priority": 0.8
         "--workdir",
         "../../..",
         "upload_dm_results",
-        "repository=skia",
+        "repository=<(REPO)",
         "buildername=Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-GN",
         "mastername=fake-master",
         "buildnumber=2",
         "swarm_out_dir=${ISOLATED_OUTDIR}",
         "revision=<(REVISION)",
         "patch_storage=<(PATCH_STORAGE)",
-        "rietveld=<(CODEREVIEW_SERVER)",
-        "issue=<(ISSUE)",
-        "patchset=<(PATCHSET)"
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
       ],
       "isolate": "upload_dm_results.isolate",
       "priority": 0.8