blob: 2b10e4005383f494394e3b826566b86214998a86 [file] [log] [blame]
[
{
"cmd": [
"touch",
"[CLEANUP]\\zip-example_tmp_1\\a"
],
"name": "touch a"
},
{
"cmd": [
"touch",
"[CLEANUP]\\zip-example_tmp_1\\b"
],
"name": "touch b"
},
{
"cmd": [
"vpython3",
"-u",
"RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py",
"--json-output",
"/path/to/tmp/json",
"ensure-directory",
"--mode",
"0777",
"[CLEANUP]\\zip-example_tmp_1\\sub\\dir"
],
"infra_step": true,
"name": "mkdirs"
},
{
"cmd": [
"touch",
"[CLEANUP]\\zip-example_tmp_1\\sub\\dir\\c"
],
"name": "touch c"
},
{
"cmd": [
"python3",
"RECIPE_MODULE[gerrit::zip]\\resources\\zip.py"
],
"name": "zipping",
"stdin": "{\"comment\": \"hello\", \"entries\": [{\"path\": \"[CLEANUP]\\\\zip-example_tmp_1\", \"type\": \"dir\"}], \"mode\": \"w\", \"output\": \"[CLEANUP]\\\\zip-example_tmp_1\\\\output.zip\", \"root\": \"[CLEANUP]\\\\zip-example_tmp_1\"}"
},
{
"cmd": [
"python3",
"RECIPE_MODULE[gerrit::zip]\\resources\\zip.py"
],
"name": "zipping more",
"stdin": "{\"comment\": \"\", \"entries\": [{\"archive_name\": null, \"path\": \"[CLEANUP]\\\\zip-example_tmp_1\\\\a\", \"type\": \"file\"}, {\"archive_name\": null, \"path\": \"[CLEANUP]\\\\zip-example_tmp_1\\\\b\", \"type\": \"file\"}, {\"path\": \"[CLEANUP]\\\\zip-example_tmp_1\\\\sub\", \"type\": \"dir\"}], \"mode\": \"w\", \"output\": \"[CLEANUP]\\\\zip-example_tmp_1\\\\more.zip\", \"root\": \"[CLEANUP]\\\\zip-example_tmp_1\"}"
},
{
"cmd": [
"python3",
"RECIPE_MODULE[gerrit::zip]\\resources\\zip.py"
],
"name": "zipping more updates",
"stdin": "{\"comment\": \"hello again\", \"entries\": [{\"archive_name\": \"renamed_a\", \"path\": \"[CLEANUP]\\\\zip-example_tmp_1\\\\update_a\", \"type\": \"file\"}, {\"archive_name\": \"renamed_b\", \"path\": \"[CLEANUP]\\\\zip-example_tmp_1\\\\update_b\", \"type\": \"file\"}], \"mode\": \"a\", \"output\": \"[CLEANUP]\\\\zip-example_tmp_1\\\\more.zip\", \"root\": \"[CLEANUP]\\\\zip-example_tmp_1\"}"
},
{
"cmd": [
"echo",
"[CLEANUP]\\zip-example_tmp_1\\more.zip"
],
"name": "report"
},
{
"cmd": [
"python3",
"RECIPE_MODULE[gerrit::zip]\\resources\\unzip.py"
],
"name": "unzipping",
"stdin": "{\"output\": \"[CLEANUP]\\\\zip-example_tmp_1\\\\output\", \"quiet\": true, \"zip_file\": \"[CLEANUP]\\\\zip-example_tmp_1\\\\output.zip\"}"
},
{
"cmd": [
"find"
],
"cwd": "[CLEANUP]\\zip-example_tmp_1\\output",
"name": "listing"
},
{
"cmd": [
"vpython3",
"-u",
"RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py",
"--json-output",
"/path/to/tmp/json",
"rmtree",
"[CLEANUP]\\zip-example_tmp_1"
],
"infra_step": true,
"name": "cleanup"
},
{
"cmd": [
"python3",
"RECIPE_MODULE[gerrit::zip]\\resources\\zipcomment.py"
],
"name": "get comment",
"stdin": "{\"zip_file\": \"[CLEANUP]\\\\zip-example_tmp_1\\\\output.zip\"}"
},
{
"cmd": [
"echo",
""
],
"name": "report comment"
},
{
"name": "$result"
}
]