Commit the patch before bundling recipes
This was part of https://skia-review.googlesource.com/c/11340/ but split out before relanding. Bug: skia:5813 Change-Id: I5cc97a588300a8656989a8d73e1231bdd606ef39 Reviewed-on: https://skia-review.googlesource.com/11483 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Eric Boren <borenet@google.com>
This commit is contained in:
parent
60cd57ed9f
commit
2e2b27fcc1
@ -35,6 +35,10 @@
|
||||
"{\"skia\": \"got_revision\"}",
|
||||
"--git-cache-dir",
|
||||
"[CUSTOM_/_B_CACHE]",
|
||||
"--issue",
|
||||
"10101",
|
||||
"--patchset",
|
||||
"3",
|
||||
"--output_json",
|
||||
"/path/to/tmp/json",
|
||||
"--revision",
|
||||
@ -76,12 +80,33 @@
|
||||
"@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"commit",
|
||||
"-a",
|
||||
"-m",
|
||||
"Commit Patch"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
"BUILDTYPE": "Release",
|
||||
"CHROME_HEADLESS": "1",
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
|
||||
"SKIA_OUT": "[START_DIR]/out"
|
||||
},
|
||||
"infra_step": true,
|
||||
"name": "Commit Patch"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"[CUSTOM_/_B_WORK]/skia/infra/bots/recipes.py",
|
||||
"bundle"
|
||||
"bundle",
|
||||
"--destination",
|
||||
"[CUSTOM_[SWARM_OUT_DIR]]/recipe_bundle"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
"BUILDTYPE": "Release",
|
||||
"CHROME_HEADLESS": "1",
|
||||
@ -91,17 +116,6 @@
|
||||
"infra_step": true,
|
||||
"name": "Bundle Recipes"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"\nimport shutil\nimport sys\nshutil.copytree(sys.argv[1], sys.argv[2], symlinks=bool(sys.argv[3]))\n",
|
||||
"[START_DIR]/bundle",
|
||||
"[CUSTOM_[SWARM_OUT_DIR]]/recipe_bundle",
|
||||
"0"
|
||||
],
|
||||
"name": "Copy Recipe Bundle"
|
||||
},
|
||||
{
|
||||
"name": "$result",
|
||||
"recipe_result": null,
|
||||
|
@ -19,12 +19,17 @@ DEPS = [
|
||||
|
||||
def RunSteps(api):
|
||||
api.core.setup()
|
||||
recipes_py = api.vars.infrabots_dir.join('recipes.py')
|
||||
api.run(api.step, 'Bundle Recipes', infra_step=True,
|
||||
cmd=['python', recipes_py, 'bundle'])
|
||||
src_dir = api.path['start_dir'].join('bundle')
|
||||
dst_dir = api.vars.swarming_out_dir.join('recipe_bundle')
|
||||
api.shutil.copytree('Copy Recipe Bundle', src_dir, dst_dir)
|
||||
|
||||
bundle_dir = api.vars.swarming_out_dir.join('recipe_bundle')
|
||||
with api.step.context({'cwd': api.vars.skia_dir}):
|
||||
if api.vars.is_trybot:
|
||||
# Recipe bundling requires that any changes be committed.
|
||||
api.run(api.step, 'Commit Patch', infra_step=True,
|
||||
cmd=['git', 'commit', '-a', '-m', 'Commit Patch'])
|
||||
recipes_py = api.vars.infrabots_dir.join('recipes.py')
|
||||
api.run(api.step, 'Bundle Recipes', infra_step=True,
|
||||
cmd=['python', recipes_py, 'bundle', '--destination', bundle_dir])
|
||||
|
||||
api.run.check_failure()
|
||||
|
||||
|
||||
@ -38,7 +43,10 @@ def GenTests(api):
|
||||
repository='https://skia.googlesource.com/skia.git',
|
||||
revision='abc123',
|
||||
path_config='kitchen',
|
||||
swarm_out_dir='[SWARM_OUT_DIR]') +
|
||||
swarm_out_dir='[SWARM_OUT_DIR]',
|
||||
nobuildbot='True',
|
||||
patch_issue='10101',
|
||||
patch_set='3') +
|
||||
api.path.exists(
|
||||
api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user