blob: de663b13e95e1f77a24372cb74eb12eb7dd7d7ce [file] [log] [blame]
[
{
"cmd": [
"vpython",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"ensure-directory",
"--mode",
"0777",
"[CACHE]/codesearch_update_submodules_mirror"
],
"infra_step": true,
"name": "Create checkout parent dir"
},
{
"cmd": [
"vpython",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"glob",
"[CACHE]/codesearch_update_submodules_mirror",
"src/"
],
"infra_step": true,
"name": "Check for existing source checkout dir",
"~followup_annotations": [
"@@@STEP_LOG_LINE@glob@[CACHE]/codesearch_update_submodules_mirror/src@@@",
"@@@STEP_LOG_END@glob@@@"
]
},
{
"cmd": [
"git",
"fetch",
"-t"
],
"cwd": "[CACHE]/codesearch_update_submodules_mirror/src/",
"infra_step": true,
"name": "git fetch"
},
{
"cmd": [],
"name": "Process refs/heads/master"
},
{
"cmd": [],
"name": "Process refs/heads/master.Check for new commits",
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@",
"@@@STEP_TEXT@no new commits, exiting@@@"
]
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py",
"--json-file",
"/path/to/tmp/json",
"--url",
"https://chromium.googlesource.com/codesearch/src_mirror/+log/refs/heads/master",
"--format",
"json",
"--log-limit",
"2"
],
"name": "Process refs/heads/master.Check for new commits.Find latest commit to target repo",
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@2@@@",
"@@@STEP_TEXT@<br />2 commits fetched@@@",
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"log\": [@@@",
"@@@STEP_LOG_LINE@json.output@ {@@@",
"@@@STEP_LOG_LINE@json.output@ \"author\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"name\": \"Submodules bot\"@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"commit\": \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ {@@@",
"@@@STEP_LOG_LINE@json.output@ \"author\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"name\": \"Someone else\"@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"commit\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ ]@@@",
"@@@STEP_LOG_LINE@json.output@}@@@",
"@@@STEP_LOG_END@json.output@@@"
]
},
{
"cmd": [
"git",
"rev-parse",
"refs/remotes/origin/master"
],
"cwd": "[CACHE]/codesearch_update_submodules_mirror/src/",
"infra_step": true,
"name": "Process refs/heads/master.Check for new commits.Get latest commit hash in source repo",
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@2@@@"
]
},
{
"cmd": [
"git",
"push",
"https://chromium.googlesource.com/codesearch/src_mirror",
"refs/remotes/origin/master:refs/heads/master-original"
],
"cwd": "[CACHE]/codesearch_update_submodules_mirror/src/",
"infra_step": true,
"name": "git push"
},
{
"cmd": [
"git",
"push",
"--tags",
"https://chromium.googlesource.com/codesearch/src_mirror"
],
"cwd": "[CACHE]/codesearch_update_submodules_mirror/src/",
"infra_step": true,
"name": "git push --tags"
},
{
"name": "$result"
}
]