Fix recipes for Gerrit property rename
NOTREECHECKS=true BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2455523004 Review-Url: https://codereview.chromium.org/2455523004
This commit is contained in:
parent
eb94e56882
commit
96b38426b6
@ -120,17 +120,17 @@ class SkiaVarsApi(recipe_api.RecipeApi):
|
||||
self.is_trybot = True
|
||||
self.issue = self.m.properties['issue']
|
||||
self.patchset = self.m.properties['patchset']
|
||||
elif (self.m.properties.get('event.change.number', '') and
|
||||
self.m.properties.get('event.patchSet.ref', '')):
|
||||
elif (self.m.properties.get('patch_issue', '') and
|
||||
self.m.properties.get('patch_ref', '')):
|
||||
self.is_trybot = True
|
||||
self.issue = self.m.properties['event.change.number']
|
||||
self.patchset = self.m.properties['event.patchSet.ref'].split('/')[-1]
|
||||
self.issue = self.m.properties['patch_issue']
|
||||
self.patchset = self.m.properties['patch_ref'].split('/')[-1]
|
||||
else:
|
||||
self.is_trybot = self.builder_cfg['is_trybot']
|
||||
if self.is_trybot:
|
||||
if self.patch_storage == 'gerrit':
|
||||
self.issue = self.m.properties['event.change.number']
|
||||
self.patchset = self.m.properties['event.patchSet.ref'].split('/')[-1]
|
||||
self.issue = self.m.properties['patch_issue']
|
||||
self.patchset = self.m.properties['patch_ref'].split('/')[-1]
|
||||
else:
|
||||
self.issue = self.m.properties['issue']
|
||||
self.patchset = self.m.properties['patchset']
|
||||
|
@ -34,10 +34,10 @@
|
||||
"{\"skia\": \"got_revision\"}",
|
||||
"--git-cache-dir",
|
||||
"[CUSTOM_C:\\_B_CACHE]",
|
||||
"--issue",
|
||||
"500",
|
||||
"--patchset",
|
||||
"1",
|
||||
"--gerrit_repo",
|
||||
"skia",
|
||||
"--gerrit_ref",
|
||||
"refs/changes/89/456789/12",
|
||||
"--output_json",
|
||||
"/path/to/tmp/json",
|
||||
"--revision",
|
||||
|
@ -35,9 +35,9 @@
|
||||
"--git-cache-dir",
|
||||
"[CUSTOM_C:\\_B_CACHE]",
|
||||
"--gerrit_repo",
|
||||
"skia",
|
||||
"https://skia.googlesource.com/skia",
|
||||
"--gerrit_ref",
|
||||
"refs/changes/00/2100/2",
|
||||
"refs/changes/89/456789/12",
|
||||
"--output_json",
|
||||
"/path/to/tmp/json",
|
||||
"--revision",
|
||||
|
@ -175,12 +175,6 @@ def GenTests(api):
|
||||
api.platform('win', 64)
|
||||
)
|
||||
|
||||
gerrit_kwargs = {
|
||||
'patch_storage': 'gerrit',
|
||||
'repository': 'skia',
|
||||
'event.patchSet.ref': 'refs/changes/00/2100/2',
|
||||
'event.change.number': '2100',
|
||||
}
|
||||
yield (
|
||||
api.test('recipe_with_gerrit_patch') +
|
||||
api.properties(
|
||||
@ -191,7 +185,12 @@ def GenTests(api):
|
||||
path_config='kitchen',
|
||||
swarm_out_dir='[SWARM_OUT_DIR]',
|
||||
revision='abc123',
|
||||
**gerrit_kwargs) +
|
||||
patch_storage='gerrit') +
|
||||
api.properties.tryserver(
|
||||
buildername=buildername + '-Trybot',
|
||||
gerrit_project='skia',
|
||||
gerrit_url='https://skia-review.googlesource.com/',
|
||||
) +
|
||||
api.platform('win', 64)
|
||||
)
|
||||
|
||||
@ -226,9 +225,13 @@ def GenTests(api):
|
||||
swarm_out_dir='[SWARM_OUT_DIR]',
|
||||
revision='abc123',
|
||||
nobuildbot='True',
|
||||
issue=500,
|
||||
patchset=1,
|
||||
patch_storage='gerrit',
|
||||
gerrit='https://skia-review.googlesource.com') +
|
||||
patch_issue=500,
|
||||
patch_set=1,
|
||||
patch_storage='gerrit') +
|
||||
api.properties.tryserver(
|
||||
buildername=buildername,
|
||||
gerrit_project='skia',
|
||||
gerrit_url='https://skia-review.googlesource.com/',
|
||||
) +
|
||||
api.platform('win', 64)
|
||||
)
|
||||
|
@ -190,11 +190,11 @@
|
||||
"gitHash",
|
||||
"abc123",
|
||||
"build_number",
|
||||
"5",
|
||||
"571",
|
||||
"issue",
|
||||
"2100",
|
||||
"456789",
|
||||
"patchset",
|
||||
"2",
|
||||
"12",
|
||||
"patch_storage",
|
||||
"gerrit",
|
||||
"no_buildbot",
|
||||
|
@ -320,37 +320,44 @@ def GenTests(api):
|
||||
api.platform('win', 64)
|
||||
)
|
||||
|
||||
gerrit_kwargs = {
|
||||
'patch_storage': 'gerrit',
|
||||
'repository': 'skia',
|
||||
'event.patchSet.ref': 'refs/changes/00/2100/2',
|
||||
'event.change.number': '2100',
|
||||
}
|
||||
builder = ('Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind-'
|
||||
'Trybot')
|
||||
yield (
|
||||
api.test('recipe_with_gerrit_patch') +
|
||||
api.properties(
|
||||
buildername='Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-' +
|
||||
'Valgrind-Trybot',
|
||||
buildername=builder,
|
||||
mastername='client.skia',
|
||||
slavename='skiabot-linux-swarm-000',
|
||||
buildnumber=5,
|
||||
path_config='kitchen',
|
||||
swarm_out_dir='[SWARM_OUT_DIR]',
|
||||
revision='abc123',
|
||||
**gerrit_kwargs)
|
||||
patch_storage='gerrit') +
|
||||
api.properties.tryserver(
|
||||
buildername=builder,
|
||||
gerrit_project='skia',
|
||||
gerrit_url='https://skia-review.googlesource.com/',
|
||||
)
|
||||
)
|
||||
|
||||
builder = 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot'
|
||||
yield (
|
||||
api.test('nobuildbot') +
|
||||
api.properties(buildername=builder,
|
||||
mastername='client.skia',
|
||||
slavename='skiabot-linux-swarm-000',
|
||||
buildnumber=5,
|
||||
revision='abc123',
|
||||
path_config='kitchen',
|
||||
nobuildbot='True',
|
||||
swarm_out_dir='[SWARM_OUT_DIR]',
|
||||
**gerrit_kwargs) +
|
||||
api.properties(
|
||||
buildername=builder,
|
||||
mastername='client.skia',
|
||||
slavename='skiabot-linux-swarm-000',
|
||||
buildnumber=5,
|
||||
revision='abc123',
|
||||
path_config='kitchen',
|
||||
nobuildbot='True',
|
||||
swarm_out_dir='[SWARM_OUT_DIR]',
|
||||
patch_storage='gerrit') +
|
||||
api.properties.tryserver(
|
||||
buildername=builder,
|
||||
gerrit_project='skia',
|
||||
gerrit_url='https://skia-review.googlesource.com/',
|
||||
) +
|
||||
api.path.exists(
|
||||
api.path['slave_build'].join('skia'),
|
||||
api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
|
||||
|
@ -219,15 +219,15 @@
|
||||
"gitHash",
|
||||
"abc123",
|
||||
"master",
|
||||
"client.skia",
|
||||
"chromium.testing.master",
|
||||
"builder",
|
||||
"Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot",
|
||||
"build_number",
|
||||
"5",
|
||||
"571",
|
||||
"issue",
|
||||
"2100",
|
||||
"456789",
|
||||
"patchset",
|
||||
"2",
|
||||
"12",
|
||||
"patch_storage",
|
||||
"gerrit",
|
||||
"no_buildbot",
|
||||
|
@ -191,15 +191,15 @@
|
||||
"gitHash",
|
||||
"abc123",
|
||||
"master",
|
||||
"client.skia",
|
||||
"chromium.testing.master",
|
||||
"builder",
|
||||
"Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot",
|
||||
"build_number",
|
||||
"5",
|
||||
"571",
|
||||
"issue",
|
||||
"2100",
|
||||
"456789",
|
||||
"patchset",
|
||||
"2",
|
||||
"12",
|
||||
"patch_storage",
|
||||
"gerrit",
|
||||
"--svgs",
|
||||
|
@ -677,12 +677,6 @@ def GenTests(api):
|
||||
)
|
||||
|
||||
builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot'
|
||||
gerrit_kwargs = {
|
||||
'patch_storage': 'gerrit',
|
||||
'repository': 'skia',
|
||||
'event.patchSet.ref': 'refs/changes/00/2100/2',
|
||||
'event.change.number': '2100',
|
||||
}
|
||||
yield (
|
||||
api.test('recipe_with_gerrit_patch') +
|
||||
api.properties(
|
||||
@ -693,7 +687,12 @@ def GenTests(api):
|
||||
path_config='kitchen',
|
||||
swarm_out_dir='[SWARM_OUT_DIR]',
|
||||
revision='abc123',
|
||||
**gerrit_kwargs)
|
||||
patch_storage='gerrit') +
|
||||
api.properties.tryserver(
|
||||
buildername=builder,
|
||||
gerrit_project='skia',
|
||||
gerrit_url='https://skia-review.googlesource.com/',
|
||||
)
|
||||
)
|
||||
|
||||
yield (
|
||||
@ -707,7 +706,12 @@ def GenTests(api):
|
||||
swarm_out_dir='[SWARM_OUT_DIR]',
|
||||
revision='abc123',
|
||||
nobuildbot='True',
|
||||
**gerrit_kwargs) +
|
||||
patch_storage='gerrit') +
|
||||
api.properties.tryserver(
|
||||
buildername=builder,
|
||||
gerrit_project='skia',
|
||||
gerrit_url='https://skia-review.googlesource.com/',
|
||||
) +
|
||||
api.step_data('get swarming bot id',
|
||||
stdout=api.raw_io.output('skia-bot-123')) +
|
||||
api.step_data('get swarming task id', stdout=api.raw_io.output('123456'))
|
||||
|
@ -4,7 +4,7 @@
|
||||
"python",
|
||||
"-u",
|
||||
"\nimport json\nimport sys\n\nwith open(sys.argv[1]) as f:\n content = json.load(f)\n\nprint json.dumps(content, indent=2)\n",
|
||||
"{\"buildername\": \"Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot\", \"buildnumber\": 5, \"event.change.number\": \"2100\", \"event.patchSet.ref\": \"refs/changes/00/2100/2\", \"mastername\": \"client.skia\", \"patch_storage\": \"gerrit\", \"path_config\": \"kitchen\", \"recipe\": \"swarm_trigger\", \"repository\": \"skia\", \"revision\": \"abc123\", \"slavename\": \"skiabot-linux-swarm-000\"}"
|
||||
"{\"buildername\": \"Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot\", \"buildnumber\": 5, \"mastername\": \"client.skia\", \"patch_issue\": \"2100\", \"patch_ref\": \"refs/changes/00/2100/2\", \"patch_set\": \"2\", \"patch_storage\": \"gerrit\", \"path_config\": \"kitchen\", \"recipe\": \"swarm_trigger\", \"repository\": \"skia\", \"revision\": \"abc123\", \"slavename\": \"skiabot-linux-swarm-000\"}"
|
||||
],
|
||||
"name": "print properties",
|
||||
"~followup_annotations": [
|
||||
@ -371,16 +371,16 @@
|
||||
"--workdir",
|
||||
"../../..",
|
||||
"swarm_compile",
|
||||
"event.change.number=2100",
|
||||
"repository=skia",
|
||||
"buildername=Build-Ubuntu-GCC-x86_64-Debug-Trybot",
|
||||
"mastername=client.skia.compile",
|
||||
"patch_issue=2100",
|
||||
"patch_storage=gerrit",
|
||||
"buildnumber=1",
|
||||
"slavename=skiabot-dummy-compile-slave",
|
||||
"reason=Triggered by Skia swarm_trigger Recipe",
|
||||
"swarm_out_dir=${ISOLATED_OUTDIR}",
|
||||
"event.patchSet.ref=refs/changes/00/2100/2",
|
||||
"patch_ref=refs/changes/00/2100/2",
|
||||
"revision=abc123"
|
||||
],
|
||||
"name": "[trigger] compile_skia on Ubuntu",
|
||||
@ -649,16 +649,16 @@
|
||||
"--workdir",
|
||||
"../../..",
|
||||
"swarm_test",
|
||||
"event.change.number=2100",
|
||||
"repository=skia",
|
||||
"buildername=Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot",
|
||||
"mastername=client.skia",
|
||||
"patch_issue=2100",
|
||||
"patch_storage=gerrit",
|
||||
"buildnumber=5",
|
||||
"slavename=skiabot-linux-swarm-000",
|
||||
"reason=Triggered by Skia swarm_trigger Recipe",
|
||||
"swarm_out_dir=${ISOLATED_OUTDIR}",
|
||||
"event.patchSet.ref=refs/changes/00/2100/2",
|
||||
"patch_ref=refs/changes/00/2100/2",
|
||||
"revision=abc123"
|
||||
],
|
||||
"name": "[trigger] test_skia on Ubuntu",
|
||||
@ -892,16 +892,16 @@
|
||||
"--workdir",
|
||||
"../../..",
|
||||
"upload_dm_results",
|
||||
"event.change.number=2100",
|
||||
"repository=skia",
|
||||
"buildername=Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot",
|
||||
"mastername=client.skia",
|
||||
"patch_issue=2100",
|
||||
"patch_storage=gerrit",
|
||||
"buildnumber=5",
|
||||
"slavename=skiabot-linux-swarm-000",
|
||||
"reason=Triggered by Skia swarm_trigger Recipe",
|
||||
"swarm_out_dir=${ISOLATED_OUTDIR}",
|
||||
"event.patchSet.ref=refs/changes/00/2100/2",
|
||||
"patch_ref=refs/changes/00/2100/2",
|
||||
"revision=abc123"
|
||||
],
|
||||
"name": "[trigger] upload_dm_results_skia on Linux",
|
||||
|
@ -214,8 +214,8 @@ def trigger_task(api, task_name, builder, master, slave, buildnumber,
|
||||
if api.properties.get('patch_storage') == 'gerrit':
|
||||
properties['patch_storage'] = api.properties['patch_storage']
|
||||
properties['repository'] = api.properties['repository']
|
||||
properties['event.patchSet.ref'] = api.properties['event.patchSet.ref']
|
||||
properties['event.change.number'] = api.properties['event.change.number']
|
||||
properties['patch_ref'] = api.properties['patch_ref']
|
||||
properties['patch_issue'] = api.properties['patch_issue']
|
||||
else:
|
||||
properties['issue'] = str(api.properties['issue'])
|
||||
properties['patchset'] = str(api.properties['patchset'])
|
||||
@ -749,8 +749,9 @@ def GenTests(api):
|
||||
gerrit_kwargs = {
|
||||
'patch_storage': 'gerrit',
|
||||
'repository': 'skia',
|
||||
'event.patchSet.ref': 'refs/changes/00/2100/2',
|
||||
'event.change.number': '2100',
|
||||
'patch_ref': 'refs/changes/00/2100/2',
|
||||
'patch_issue': '2100',
|
||||
'patch_set': '2',
|
||||
}
|
||||
yield (
|
||||
api.test('recipe_with_gerrit_patch') +
|
||||
|
@ -99,7 +99,7 @@
|
||||
"-z",
|
||||
"json,log",
|
||||
"[CWD]/tmp_upload/*",
|
||||
"gs://skia-infra-gm/trybot/dm-json-v1/2012/05/14/12/abc123/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/1337000001/2100/2"
|
||||
"gs://skia-infra-gm/trybot/dm-json-v1/2012/05/14/12/abc123/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/1337000001/456789/12"
|
||||
],
|
||||
"name": "upload JSON and logs"
|
||||
},
|
||||
|
@ -88,8 +88,8 @@ def RunSteps(api):
|
||||
patchset = str(api.properties.get('patchset', ''))
|
||||
if (api.properties.get('patch_storage', '') == 'gerrit' and
|
||||
api.properties.get('nobuildbot', '') != 'True'):
|
||||
issue = str(api.properties['event.change.number'])
|
||||
patchset = str(api.properties['event.patchSet.ref']).split('/')[-1]
|
||||
issue = str(api.properties['patch_issue'])
|
||||
patchset = str(api.properties['patch_ref']).split('/')[-1]
|
||||
if issue and patchset:
|
||||
summary_dest_path = '/'.join((
|
||||
'trybot', summary_dest_path, issue, patchset))
|
||||
@ -139,17 +139,16 @@ def GenTests(api):
|
||||
patchset='1002')
|
||||
)
|
||||
|
||||
gerrit_kwargs = {
|
||||
'patch_storage': 'gerrit',
|
||||
'repository': 'skia',
|
||||
'event.patchSet.ref': 'refs/changes/00/2100/2',
|
||||
'event.change.number': '2100',
|
||||
}
|
||||
yield (
|
||||
api.test('recipe_with_gerrit_patch') +
|
||||
api.properties(
|
||||
buildername=builder,
|
||||
revision='abc123',
|
||||
path_config='kitchen',
|
||||
**gerrit_kwargs)
|
||||
patch_storage='gerrit') +
|
||||
api.properties.tryserver(
|
||||
buildername=builder,
|
||||
gerrit_project='skia',
|
||||
gerrit_url='https://skia-review.googlesource.com/',
|
||||
)
|
||||
)
|
||||
|
@ -19,7 +19,7 @@
|
||||
"-z",
|
||||
"json",
|
||||
"[CWD]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/data/nanobench_abc123.json",
|
||||
"gs://skia-perf/trybot/nano-json-v1/2012/05/14/12/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/2100/2/nanobench_abc123.json"
|
||||
"gs://skia-perf/trybot/nano-json-v1/2012/05/14/12/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/456789/12/nanobench_abc123.json"
|
||||
],
|
||||
"name": "upload"
|
||||
},
|
||||
|
@ -43,8 +43,8 @@ def RunSteps(api):
|
||||
patchset = str(api.properties.get('patchset', ''))
|
||||
if (api.properties.get('patch_storage', '') == 'gerrit' and
|
||||
api.properties.get('nobuildbot', '') != 'True'):
|
||||
issue = str(api.properties['event.change.number'])
|
||||
patchset = str(api.properties['event.patchSet.ref']).split('/')[-1]
|
||||
issue = str(api.properties['patch_issue'])
|
||||
patchset = str(api.properties['patch_ref']).split('/')[-1]
|
||||
if issue and patchset:
|
||||
gs_path = '/'.join(('trybot', gs_path, issue, patchset))
|
||||
|
||||
@ -74,17 +74,16 @@ def GenTests(api):
|
||||
patchset='1002')
|
||||
)
|
||||
|
||||
gerrit_kwargs = {
|
||||
'patch_storage': 'gerrit',
|
||||
'repository': 'skia',
|
||||
'event.patchSet.ref': 'refs/changes/00/2100/2',
|
||||
'event.change.number': '2100',
|
||||
}
|
||||
yield (
|
||||
api.test('recipe_with_gerrit_patch') +
|
||||
api.properties(
|
||||
buildername=builder,
|
||||
revision='abc123',
|
||||
path_config='kitchen',
|
||||
**gerrit_kwargs)
|
||||
patch_storage='gerrit') +
|
||||
api.properties.tryserver(
|
||||
buildername=builder,
|
||||
gerrit_project='skia',
|
||||
gerrit_url='https://skia-review.googlesource.com/',
|
||||
)
|
||||
)
|
||||
|
@ -5,17 +5,17 @@ deps {
|
||||
project_id: "build"
|
||||
url: "https://chromium.googlesource.com/chromium/tools/build.git"
|
||||
branch: "master"
|
||||
revision: "6a6a57ff4c914c89b15b84be4a4fe327b75adc38"
|
||||
revision: "b061208b3f8e9f45d4c436ad19d383dfb0ee5d98"
|
||||
}
|
||||
deps {
|
||||
project_id: "depot_tools"
|
||||
url: "https://chromium.googlesource.com/chromium/tools/depot_tools.git"
|
||||
branch: "master"
|
||||
revision: "99e2cdf47a3f1083bde35d7553fda218fd7f37d6"
|
||||
revision: "b655dbda883a2668433a54166ff1f42cddd13c8e"
|
||||
}
|
||||
deps {
|
||||
project_id: "recipe_engine"
|
||||
url: "https://chromium.googlesource.com/external/github.com/luci/recipes-py.git"
|
||||
branch: "master"
|
||||
revision: "6e11fcc25f244f962bf750349a805bb3261977ff"
|
||||
revision: "24a5bf068cee997aec0c60df51ca81bfa5ac5416"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user