[recipes] Check out a separate depot_tools for syncing Chrome

This is a hack to get around the fact that we can't update the normal
version of depot_tools we receive through recipe deps, since we are not
yet using kitchen (See skia:7050).

Bug: skia:7609
Change-Id: I7d39e1e5db716960b2df2c8e3d4325c4b20c774e
Reviewed-on: https://skia-review.googlesource.com/106720
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
This commit is contained in:
Eric Boren 2018-02-12 14:41:56 -05:00 committed by Skia Commit-Bot
parent 3fc79ea031
commit 25c1083e35
10 changed files with 565 additions and 14 deletions

View File

@ -5,6 +5,7 @@
DEPS = [
'depot_tools/bot_update',
'depot_tools/gclient',
'depot_tools/git',
'depot_tools/tryserver',
'flavor',
'recipe_engine/context',

View File

@ -154,4 +154,12 @@ class SkiaApi(recipe_api.RecipeApi):
if self.m.vars.need_chromium_checkout:
with self.m.context(cwd=self.m.vars.checkout_root,
env=self.m.vars.gclient_env):
self.m.gclient.runhooks()
# TODO(borenet): Remove this hack and replace with
# 'self.m.gclient.runhooks()' after the transition to Kitchen:
# https://bugs.chromium.org/p/skia/issues/detail?id=7050
depot_tools = self.m.vars.checkout_root.join('depot_tools')
self.m.git.checkout(
'https://chromium.googlesource.com/chromium/tools/depot_tools.git',
dir_path=depot_tools, ref='master')
self.m.run(self.m.step, 'gclient runhooks',
cmd=[depot_tools.join('gclient'), 'runhooks'])

View File

@ -100,13 +100,121 @@
"cmd": [
"python",
"-u",
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
"[CUSTOM_/_B_WORK]/depot_tools",
"--url",
"https://chromium.googlesource.com/chromium/tools/depot_tools.git"
],
"cwd": "[CUSTOM_/_B_WORK]",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"name": "git setup"
},
{
"cmd": [
"git",
"retry",
"fetch",
"origin",
"master",
"--progress"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1",
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:<PATH>"
},
"infra_step": true,
"name": "git fetch"
},
{
"cmd": [
"git",
"checkout",
"-f",
"FETCH_HEAD"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "git checkout"
},
{
"cmd": [
"git",
"rev-parse",
"HEAD"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "read revision",
"stdout": "/path/to/tmp/",
"~followup_annotations": [
"@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@"
]
},
{
"cmd": [
"git",
"clean",
"-f",
"-d",
"-x"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "git clean"
},
{
"cmd": [
"git",
"submodule",
"sync"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "submodule sync"
},
{
"cmd": [
"git",
"submodule",
"update",
"--init",
"--recursive"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "submodule update"
},
{
"cmd": [
"[CUSTOM_/_B_WORK]/depot_tools/gclient",
"runhooks"
],
"cwd": "[CUSTOM_/_B_WORK]",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "gclient runhooks"
},

View File

@ -9,6 +9,7 @@
"--output-dir",
"[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug",
"--no-sync",
"--no-hooks",
"--make-output-dir"
],
"env": {

View File

@ -20,7 +20,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
args=[
'--chrome-dir', self.m.vars.checkout_root,
'--output-dir', self.m.vars.skia_out.join(self.m.vars.configuration),
'--no-sync', '--make-output-dir'])
'--no-sync', '--no-hooks', '--make-output-dir'])
def _get_goma_json(self):
json_key = 'jwt_service_account_goma-client'

View File

@ -100,13 +100,121 @@
"cmd": [
"python",
"-u",
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
"[CUSTOM_/_B_WORK]/depot_tools",
"--url",
"https://chromium.googlesource.com/chromium/tools/depot_tools.git"
],
"cwd": "[CUSTOM_/_B_WORK]",
"env": {
"GYP_CHROMIUM_NO_ACTION": "0"
},
"name": "git setup"
},
{
"cmd": [
"git",
"retry",
"fetch",
"origin",
"master",
"--progress"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"GYP_CHROMIUM_NO_ACTION": "0",
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:<PATH>"
},
"infra_step": true,
"name": "git fetch"
},
{
"cmd": [
"git",
"checkout",
"-f",
"FETCH_HEAD"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"GYP_CHROMIUM_NO_ACTION": "0"
},
"infra_step": true,
"name": "git checkout"
},
{
"cmd": [
"git",
"rev-parse",
"HEAD"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"GYP_CHROMIUM_NO_ACTION": "0"
},
"infra_step": true,
"name": "read revision",
"stdout": "/path/to/tmp/",
"~followup_annotations": [
"@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@"
]
},
{
"cmd": [
"git",
"clean",
"-f",
"-d",
"-x"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"GYP_CHROMIUM_NO_ACTION": "0"
},
"infra_step": true,
"name": "git clean"
},
{
"cmd": [
"git",
"submodule",
"sync"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"GYP_CHROMIUM_NO_ACTION": "0"
},
"infra_step": true,
"name": "submodule sync"
},
{
"cmd": [
"git",
"submodule",
"update",
"--init",
"--recursive"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"GYP_CHROMIUM_NO_ACTION": "0"
},
"infra_step": true,
"name": "submodule update"
},
{
"cmd": [
"[CUSTOM_/_B_WORK]/depot_tools/gclient",
"runhooks"
],
"cwd": "[CUSTOM_/_B_WORK]",
"env": {
"BUILDTYPE": "Debug",
"CHROME_HEADLESS": "1",
"GYP_CHROMIUM_NO_ACTION": "0",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer"
},
"name": "gclient runhooks"
},
@ -120,6 +228,7 @@
"--output-dir",
"[CUSTOM_/_B_WORK]/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug",
"--no-sync",
"--no-hooks",
"--make-output-dir"
],
"env": {

View File

@ -100,13 +100,121 @@
"cmd": [
"python",
"-u",
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
"[CUSTOM_/_B_WORK]/depot_tools",
"--url",
"https://chromium.googlesource.com/chromium/tools/depot_tools.git"
],
"cwd": "[CUSTOM_/_B_WORK]",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"name": "git setup"
},
{
"cmd": [
"git",
"retry",
"fetch",
"origin",
"master",
"--progress"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1",
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:<PATH>"
},
"infra_step": true,
"name": "git fetch"
},
{
"cmd": [
"git",
"checkout",
"-f",
"FETCH_HEAD"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "git checkout"
},
{
"cmd": [
"git",
"rev-parse",
"HEAD"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "read revision",
"stdout": "/path/to/tmp/",
"~followup_annotations": [
"@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@"
]
},
{
"cmd": [
"git",
"clean",
"-f",
"-d",
"-x"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "git clean"
},
{
"cmd": [
"git",
"submodule",
"sync"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "submodule sync"
},
{
"cmd": [
"git",
"submodule",
"update",
"--init",
"--recursive"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "submodule update"
},
{
"cmd": [
"[CUSTOM_/_B_WORK]/depot_tools/gclient",
"runhooks"
],
"cwd": "[CUSTOM_/_B_WORK]",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "gclient runhooks"
},

View File

@ -100,13 +100,121 @@
"cmd": [
"python",
"-u",
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
"[CUSTOM_/_B_WORK]/depot_tools",
"--url",
"https://chromium.googlesource.com/chromium/tools/depot_tools.git"
],
"cwd": "[CUSTOM_/_B_WORK]",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"name": "git setup"
},
{
"cmd": [
"git",
"retry",
"fetch",
"origin",
"master",
"--progress"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1",
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:<PATH>"
},
"infra_step": true,
"name": "git fetch"
},
{
"cmd": [
"git",
"checkout",
"-f",
"FETCH_HEAD"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "git checkout"
},
{
"cmd": [
"git",
"rev-parse",
"HEAD"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "read revision",
"stdout": "/path/to/tmp/",
"~followup_annotations": [
"@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@"
]
},
{
"cmd": [
"git",
"clean",
"-f",
"-d",
"-x"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "git clean"
},
{
"cmd": [
"git",
"submodule",
"sync"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "submodule sync"
},
{
"cmd": [
"git",
"submodule",
"update",
"--init",
"--recursive"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "submodule update"
},
{
"cmd": [
"[CUSTOM_/_B_WORK]/depot_tools/gclient",
"runhooks"
],
"cwd": "[CUSTOM_/_B_WORK]",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "gclient runhooks"
},

View File

@ -100,13 +100,121 @@
"cmd": [
"python",
"-u",
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
"--path",
"[CUSTOM_/_B_WORK]/depot_tools",
"--url",
"https://chromium.googlesource.com/chromium/tools/depot_tools.git"
],
"cwd": "[CUSTOM_/_B_WORK]",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"name": "git setup"
},
{
"cmd": [
"git",
"retry",
"fetch",
"origin",
"master",
"--progress"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1",
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:<PATH>"
},
"infra_step": true,
"name": "git fetch"
},
{
"cmd": [
"git",
"checkout",
"-f",
"FETCH_HEAD"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "git checkout"
},
{
"cmd": [
"git",
"rev-parse",
"HEAD"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "read revision",
"stdout": "/path/to/tmp/",
"~followup_annotations": [
"@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@"
]
},
{
"cmd": [
"git",
"clean",
"-f",
"-d",
"-x"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "git clean"
},
{
"cmd": [
"git",
"submodule",
"sync"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "submodule sync"
},
{
"cmd": [
"git",
"submodule",
"update",
"--init",
"--recursive"
],
"cwd": "[CUSTOM_/_B_WORK]/depot_tools",
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1"
},
"infra_step": true,
"name": "submodule update"
},
{
"cmd": [
"[CUSTOM_/_B_WORK]/depot_tools/gclient",
"runhooks"
],
"cwd": "[CUSTOM_/_B_WORK]",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "gclient runhooks"
},

View File

@ -1,6 +1,7 @@
{
"api_version": 2,
"autoroll_recipe_options": {
"disable_reason": "Bots failing, assume switching to Kitchen will fix.",
"nontrivial": {
"automatic_commit_dry_run": true
},
@ -9,8 +10,7 @@
"tbr_emails": [
"borenet@google.com"
]
},
"disable_reason": "Bots failing, assume switching to Kitchen will fix."
}
},
"deps": {
"depot_tools": {