infra_paths: do nothing if path_config is not specified
Currently if path_config is not specified, infra_paths defaults to buildbot paths. We want to make this behavior explicit, so we don't have to introduce a new "luci" path configuration which tells infra_paths module to do nothing. Buildbot now specifies path_config=buildbot since https://chromium-review.googlesource.com/c/412029/ , so now we can remove this default. This also affects all expectation files because this CL switches the default path configuration from Buildbot to LUCI. In particular, it changes default git cache dir from [GIT_CACHE] to [CACHE]/git. Also code paths that work only in Buildbot environment has to have a test with path_config=buildbot. R=iannucci@chromium.org, martiniss@chromium.org BUG=662586 Change-Id: Ifeabe13e69810dd24a6deb4830699f8c9fafafae Reviewed-on: https://chromium-review.googlesource.com/411989 Commit-Queue: Nodir Turakulov <nodir@chromium.org> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>changes/89/411989/6
parent
e672f93953
commit
7da798be10
@ -0,0 +1,50 @@
|
||||
[
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
|
||||
"--spec",
|
||||
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
|
||||
"--patch_root",
|
||||
"src",
|
||||
"--revision_mapping_file",
|
||||
"{\"src\": \"got_cr_revision\"}",
|
||||
"--git-cache-dir",
|
||||
"[GIT_CACHE]",
|
||||
"--output_json",
|
||||
"/path/to/tmp/json",
|
||||
"--revision",
|
||||
"src@abc"
|
||||
],
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "bot_update (without patch)",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_TEXT@Some step text@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@{@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"src\": \"abc\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"src\", @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"got_cr_revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"got_cr_revision_cp\": \"refs/heads/master@{#170242}\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"root\": \"src\", @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@}@@@",
|
||||
"@@@STEP_LOG_END@json.output@@@",
|
||||
"@@@SET_BUILD_PROPERTY@got_cr_revision@\"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
||||
"@@@SET_BUILD_PROPERTY@got_cr_revision_cp@\"refs/heads/master@{#170242}\"@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "$result",
|
||||
"recipe_result": null,
|
||||
"status_code": 0
|
||||
}
|
||||
]
|
@ -1,54 +1,8 @@
|
||||
[
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
|
||||
"--spec",
|
||||
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
|
||||
"--patch_root",
|
||||
"src",
|
||||
"--revision_mapping_file",
|
||||
"{\"src\": \"got_cr_revision\"}",
|
||||
"--git-cache-dir",
|
||||
"[GIT_CACHE]",
|
||||
"--apply_issue_email_file",
|
||||
"[BUILD]/site_config/.rietveld_client_email",
|
||||
"--apply_issue_key_file",
|
||||
"[BUILD]/site_config/.rietveld_secret_key",
|
||||
"--output_json",
|
||||
"/path/to/tmp/json",
|
||||
"--revision",
|
||||
"src@HEAD"
|
||||
],
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "bot_update",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_TEXT@Some step text@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@{@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"src\", @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"got_cr_revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"got_cr_revision_cp\": \"refs/heads/master@{#170242}\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"root\": \"src\", @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@}@@@",
|
||||
"@@@STEP_LOG_END@json.output@@@",
|
||||
"@@@SET_BUILD_PROPERTY@got_cr_revision@\"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
||||
"@@@SET_BUILD_PROPERTY@got_cr_revision_cp@\"refs/heads/master@{#170242}\"@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "$result",
|
||||
"reason": "build path is not defined. This is normal for LUCI builds. In LUCI, use_site_config_creds parameter of bot_update.ensure_checkout is not supported",
|
||||
"recipe_result": null,
|
||||
"status_code": 0
|
||||
"status_code": 1
|
||||
}
|
||||
]
|
@ -0,0 +1,54 @@
|
||||
[
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
|
||||
"--spec",
|
||||
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
|
||||
"--patch_root",
|
||||
"src",
|
||||
"--revision_mapping_file",
|
||||
"{\"src\": \"got_cr_revision\"}",
|
||||
"--git-cache-dir",
|
||||
"[GIT_CACHE]",
|
||||
"--apply_issue_email_file",
|
||||
"[BUILD]/site_config/.rietveld_client_email",
|
||||
"--apply_issue_key_file",
|
||||
"[BUILD]/site_config/.rietveld_secret_key",
|
||||
"--output_json",
|
||||
"/path/to/tmp/json",
|
||||
"--revision",
|
||||
"src@HEAD"
|
||||
],
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "bot_update",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_TEXT@Some step text@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@{@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"src\", @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"got_cr_revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"got_cr_revision_cp\": \"refs/heads/master@{#170242}\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"root\": \"src\", @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@}@@@",
|
||||
"@@@STEP_LOG_END@json.output@@@",
|
||||
"@@@SET_BUILD_PROPERTY@got_cr_revision@\"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
||||
"@@@SET_BUILD_PROPERTY@got_cr_revision_cp@\"refs/heads/master@{#170242}\"@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "$result",
|
||||
"recipe_result": null,
|
||||
"status_code": 0
|
||||
}
|
||||
]
|
@ -0,0 +1,211 @@
|
||||
[
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
|
||||
"config",
|
||||
"--spec",
|
||||
"cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]"
|
||||
],
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "gclient setup"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
|
||||
"sync",
|
||||
"--verbose",
|
||||
"--with_branch_heads",
|
||||
"--nohooks",
|
||||
"-j8",
|
||||
"--reset",
|
||||
"--force",
|
||||
"--upstream",
|
||||
"--no-nag-max",
|
||||
"--delete_unversioned_trees",
|
||||
"--output-json",
|
||||
"/path/to/tmp/json"
|
||||
],
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "gclient sync",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_LOG_LINE@json.output@{@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"solutions\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"src/\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@}@@@",
|
||||
"@@@STEP_LOG_END@json.output@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
|
||||
"recurse",
|
||||
"git",
|
||||
"config",
|
||||
"user.name",
|
||||
"local_bot"
|
||||
],
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "gclient recurse (git config user.name)"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
|
||||
"recurse",
|
||||
"git",
|
||||
"config",
|
||||
"user.email",
|
||||
"local_bot@example.com"
|
||||
],
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "gclient recurse (git config user.email)"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
|
||||
"config",
|
||||
"--spec",
|
||||
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'Angle', 'url': 'https://chromium.googlesource.com/angle/angle.git'}]"
|
||||
],
|
||||
"cwd": "[START_DIR]/src/third_party",
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "[spec: Angle] gclient setup"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
|
||||
"sync",
|
||||
"--verbose",
|
||||
"--with_branch_heads",
|
||||
"--nohooks",
|
||||
"-j8",
|
||||
"--reset",
|
||||
"--force",
|
||||
"--upstream",
|
||||
"--no-nag-max",
|
||||
"--delete_unversioned_trees",
|
||||
"--revision",
|
||||
"src/third_party/angle@refs/heads/lkgr",
|
||||
"--output-json",
|
||||
"/path/to/tmp/json"
|
||||
],
|
||||
"cwd": "[START_DIR]/src/third_party",
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "[spec: Angle] gclient sync",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_LOG_LINE@json.output@{@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"solutions\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"Angle/\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"1fd70473fb3de634b409d4acaf49ffc1f90aae1f\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"src/blatley/\": {@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"5e800497199d615131a76cd10651e74d7c8a0962\"@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@ }@@@",
|
||||
"@@@STEP_LOG_LINE@json.output@}@@@",
|
||||
"@@@STEP_LOG_END@json.output@@@",
|
||||
"@@@SET_BUILD_PROPERTY@got_blatley_revision@\"5e800497199d615131a76cd10651e74d7c8a0962\"@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
|
||||
"recurse",
|
||||
"git",
|
||||
"config",
|
||||
"user.name",
|
||||
"local_bot"
|
||||
],
|
||||
"cwd": "[START_DIR]/src/third_party",
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "[spec: Angle] gclient recurse (git config user.name)"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
|
||||
"recurse",
|
||||
"git",
|
||||
"config",
|
||||
"user.email",
|
||||
"local_bot@example.com"
|
||||
],
|
||||
"cwd": "[START_DIR]/src/third_party",
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "[spec: Angle] gclient recurse (git config user.email)"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"\nimport os, sys\n\nbuild_path = sys.argv[1]\nif os.path.exists(build_path):\n for (path, dir, files) in os.walk(build_path):\n for cur_file in files:\n if cur_file.endswith('index.lock'):\n path_to_file = os.path.join(path, cur_file)\n print 'deleting %s' % path_to_file\n os.remove(path_to_file)\n",
|
||||
"[START_DIR]"
|
||||
],
|
||||
"name": "cleanup index.lock",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_LOG_LINE@python.inline@@@@",
|
||||
"@@@STEP_LOG_LINE@python.inline@import os, sys@@@",
|
||||
"@@@STEP_LOG_LINE@python.inline@@@@",
|
||||
"@@@STEP_LOG_LINE@python.inline@build_path = sys.argv[1]@@@",
|
||||
"@@@STEP_LOG_LINE@python.inline@if os.path.exists(build_path):@@@",
|
||||
"@@@STEP_LOG_LINE@python.inline@ for (path, dir, files) in os.walk(build_path):@@@",
|
||||
"@@@STEP_LOG_LINE@python.inline@ for cur_file in files:@@@",
|
||||
"@@@STEP_LOG_LINE@python.inline@ if cur_file.endswith('index.lock'):@@@",
|
||||
"@@@STEP_LOG_LINE@python.inline@ path_to_file = os.path.join(path, cur_file)@@@",
|
||||
"@@@STEP_LOG_LINE@python.inline@ print 'deleting %s' % path_to_file@@@",
|
||||
"@@@STEP_LOG_LINE@python.inline@ os.remove(path_to_file)@@@",
|
||||
"@@@STEP_LOG_END@python.inline@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
|
||||
"runhooks"
|
||||
],
|
||||
"cwd": "[START_DIR]/src",
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "gclient runhooks"
|
||||
},
|
||||
{
|
||||
"name": "$result",
|
||||
"recipe_result": null,
|
||||
"status_code": 0
|
||||
}
|
||||
]
|
@ -1,30 +1,8 @@
|
||||
[
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE_REPO[depot_tools]/apply_issue.py",
|
||||
"-r",
|
||||
"[START_DIR]/foo/bar",
|
||||
"-i",
|
||||
"1",
|
||||
"-p",
|
||||
"1",
|
||||
"-s",
|
||||
"http://review_tool.url",
|
||||
"-E",
|
||||
"[BUILD]/site_config/.rietveld_client_email",
|
||||
"-k",
|
||||
"[BUILD]/site_config/.rietveld_secret_key"
|
||||
],
|
||||
"name": "apply_issue",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_LINK@Applied issue 1@http://review_tool.url/1@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "$result",
|
||||
"reason": "build path is not defined. This is typical for LUCI builds. LUCI does not support rietveld.apply_issue; use bot_update instead",
|
||||
"recipe_result": null,
|
||||
"status_code": 0
|
||||
"status_code": 1
|
||||
}
|
||||
]
|
@ -0,0 +1,30 @@
|
||||
[
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE_REPO[depot_tools]/apply_issue.py",
|
||||
"-r",
|
||||
"[START_DIR]/foo/bar",
|
||||
"-i",
|
||||
"1",
|
||||
"-p",
|
||||
"1",
|
||||
"-s",
|
||||
"http://review_tool.url",
|
||||
"-E",
|
||||
"[BUILD]/site_config/.rietveld_client_email",
|
||||
"-k",
|
||||
"[BUILD]/site_config/.rietveld_secret_key"
|
||||
],
|
||||
"name": "apply_issue",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_LINK@Applied issue 1@http://review_tool.url/1@@@"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "$result",
|
||||
"recipe_result": null,
|
||||
"status_code": 0
|
||||
}
|
||||
]
|
@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"name": "$result",
|
||||
"reason": "path[\"build\"] is not defined. Possibly this is a LUCI build. tryserver.apply_from_git is not supported in LUCI builds.",
|
||||
"recipe_result": null,
|
||||
"status_code": 1
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue