blob: 7e22a14fbebd8e1a9e0e0fb3e10faddc0a6f21ae [file] [log] [blame]
[
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"ensure-directory",
"--mode",
"0777",
"[START_DIR]/garnet"
],
"infra_step": true,
"name": "makedirs"
},
{
"cmd": [
"git",
"init"
],
"cwd": "[START_DIR]/garnet",
"name": "git init"
},
{
"cmd": [
"git",
"remote",
"add",
"origin",
"https://fuchsia.googlesource.com/garnet"
],
"cwd": "[START_DIR]/garnet",
"name": "git remote"
},
{
"cmd": [
"git",
"fetch",
"origin",
"master"
],
"cwd": "[START_DIR]/garnet",
"name": "git fetch"
},
{
"cmd": [
"git",
"checkout",
"-f",
"FETCH_HEAD"
],
"cwd": "[START_DIR]/garnet",
"name": "git checkout"
},
{
"cmd": [
"git",
"rev-parse",
"HEAD"
],
"cwd": "[START_DIR]/garnet",
"name": "git rev-parse",
"stdout": "/path/to/tmp/",
"~followup_annotations": [
"@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
]
},
{
"cmd": [
"git",
"clean",
"-f",
"-d",
"-x"
],
"cwd": "[START_DIR]/garnet",
"name": "git clean"
},
{
"cmd": [
"git",
"submodule",
"sync"
],
"cwd": "[START_DIR]/garnet",
"name": "submodule sync"
},
{
"cmd": [
"git",
"submodule",
"update",
"--init"
],
"cwd": "[START_DIR]/garnet",
"name": "submodule update"
},
{
"cmd": [],
"name": "ensure_gerrit"
},
{
"cmd": [
"cipd",
"ensure",
"-root",
"[START_DIR]/cipd/gerrit",
"-ensure-file",
"infra/tools/luci/gerrit/${platform} latest",
"-json-output",
"/path/to/tmp/json"
],
"infra_step": true,
"name": "ensure_gerrit.ensure_installed",
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@",
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
"@@@STEP_LOG_LINE@json.output@ {@@@",
"@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
"@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/gerrit/resolved-platform\"@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ ]@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@}@@@",
"@@@STEP_LOG_END@json.output@@@"
]
},
{
"cmd": [
"git",
"ls-files",
"--modified",
"--deleted",
"--exclude-standard",
"--others"
],
"cwd": "[START_DIR]/garnet",
"name": "check for no-op commit",
"stdout": "/path/to/tmp/",
"~followup_annotations": [
"@@@STEP_LOG_LINE@stdout@hello@@@",
"@@@STEP_LOG_END@stdout@@@"
]
},
{
"cmd": [
"git",
"add",
"-A"
],
"cwd": "[START_DIR]/garnet",
"name": "git add"
},
{
"cmd": [
"git",
"diff"
],
"cwd": "[START_DIR]/garnet",
"name": "git diff",
"stdout": "/path/to/tmp/"
},
{
"cmd": [
"git",
"hash-object",
"a diff"
],
"cwd": "[START_DIR]/garnet",
"name": "git hash-object",
"stdout": "/path/to/tmp/"
},
{
"cmd": [
"git",
"commit",
"-m",
"hello world!\nChange-Id: Iabc123\n",
"-a"
],
"cwd": "[START_DIR]/garnet",
"name": "git commit"
},
{
"cmd": [
"git",
"push",
"origin",
"HEAD:refs/for/master"
],
"cwd": "[START_DIR]/garnet",
"name": "git push",
"~followup_annotations": [
"@@@STEP_LINK@gerrit link@https://fuchsia-review.googlesource.com/q/Iabc123@@@"
]
},
{
"cmd": [
"[START_DIR]/cipd/gerrit/gerrit",
"set-review",
"-host",
"https://fuchsia-review.googlesource.com",
"-input",
"{\"change_id\": \"garnet~master~Iabc123\", \"input\": {\"labels\": {\"Code-Review\": 2, \"Commit-Queue\": 2}}, \"revision_id\": \"current\"}",
"-output",
"/path/to/tmp/json"
],
"name": "submit to commit queue",
"~followup_annotations": [
"@@@STEP_LOG_END@json.output (invalid)@@@",
"@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
"@@@STEP_LOG_END@json.output (exception)@@@"
]
},
{
"cmd": [
"[START_DIR]/cipd/gerrit/gerrit",
"change-detail",
"-host",
"https://fuchsia-review.googlesource.com",
"-input",
"{\"change_id\": \"garnet~master~Iabc123\"}",
"-output",
"/path/to/tmp/json"
],
"infra_step": true,
"name": "check if done (0)",
"~followup_annotations": [
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"labels\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"Commit-Queue\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"approved\": {}@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"status\": \"MERGED\"@@@",
"@@@STEP_LOG_LINE@json.output@}@@@",
"@@@STEP_LOG_END@json.output@@@"
]
},
{
"jsonResult": null,
"name": "$result"
}
]