| [ | |
| { | |
| "cmd": [], | |
| "name": "Docker setup" | |
| }, | |
| { | |
| "cmd": [ | |
| "python", | |
| "-u", | |
| "import os\nprint '%d:%d' % (os.getuid(), os.getgid())\n" | |
| ], | |
| "name": "Docker setup.Get uid and gid", | |
| "~followup_annotations": [ | |
| "@@@STEP_NEST_LEVEL@1@@@", | |
| "@@@STEP_LOG_LINE@python.inline@import os@@@", | |
| "@@@STEP_LOG_LINE@python.inline@print '%d:%d' % (os.getuid(), os.getgid())@@@", | |
| "@@@STEP_LOG_END@python.inline@@@" | |
| ] | |
| }, | |
| { | |
| "cmd": [ | |
| "vpython", | |
| "-u", | |
| "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", | |
| "--json-output", | |
| "/path/to/tmp/json", | |
| "ensure-directory", | |
| "--mode", | |
| "0777", | |
| "/host-out" | |
| ], | |
| "infra_step": true, | |
| "name": "Docker setup.mkdirs out_dir", | |
| "~followup_annotations": [ | |
| "@@@STEP_NEST_LEVEL@1@@@" | |
| ] | |
| }, | |
| { | |
| "cmd": [ | |
| "chmod", | |
| "777", | |
| "/host-out" | |
| ], | |
| "infra_step": true, | |
| "name": "Docker setup.chmod 777 /host-out", | |
| "~followup_annotations": [ | |
| "@@@STEP_NEST_LEVEL@1@@@" | |
| ] | |
| }, | |
| { | |
| "cmd": [ | |
| "chmod", | |
| "755", | |
| "/host-src" | |
| ], | |
| "infra_step": true, | |
| "name": "Docker setup.chmod 755 /host-src", | |
| "~followup_annotations": [ | |
| "@@@STEP_NEST_LEVEL@1@@@" | |
| ] | |
| }, | |
| { | |
| "cmd": [ | |
| "chmod", | |
| "0755", | |
| "./do-stuff.sh" | |
| ], | |
| "infra_step": true, | |
| "name": "Docker setup.chmod 0755 ./do-stuff.sh", | |
| "~followup_annotations": [ | |
| "@@@STEP_NEST_LEVEL@1@@@" | |
| ] | |
| }, | |
| { | |
| "cmd": [ | |
| "vpython", | |
| "-u", | |
| "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", | |
| "--json-output", | |
| "/path/to/tmp/json", | |
| "ensure-directory", | |
| "--mode", | |
| "0777", | |
| "/copy-dst" | |
| ], | |
| "infra_step": true, | |
| "name": "Docker setup.mkdirs /copy-dst", | |
| "~followup_annotations": [ | |
| "@@@STEP_NEST_LEVEL@1@@@" | |
| ] | |
| }, | |
| { | |
| "cmd": [ | |
| "vpython", | |
| "-u", | |
| "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", | |
| "--json-output", | |
| "/path/to/tmp/json", | |
| "copy", | |
| "/copy-src/myfile", | |
| "/copy-dst/myfile" | |
| ], | |
| "infra_step": true, | |
| "name": "Docker setup.cp /copy-src/myfile /copy-dst/myfile", | |
| "~followup_annotations": [ | |
| "@@@STEP_NEST_LEVEL@1@@@" | |
| ] | |
| }, | |
| { | |
| "cmd": [ | |
| "chmod", | |
| "644", | |
| "/copy-dst/myfile" | |
| ], | |
| "infra_step": true, | |
| "name": "Docker setup.chmod 644 /copy-dst/myfile", | |
| "~followup_annotations": [ | |
| "@@@STEP_NEST_LEVEL@1@@@" | |
| ] | |
| }, | |
| { | |
| "cmd": [ | |
| "chmod", | |
| "-R", | |
| "a+r", | |
| "/host-src" | |
| ], | |
| "infra_step": true, | |
| "name": "Docker setup.chmod -R a+r /host-src", | |
| "~followup_annotations": [ | |
| "@@@STEP_NEST_LEVEL@1@@@" | |
| ] | |
| }, | |
| { | |
| "cmd": [ | |
| "docker", | |
| "run", | |
| "--shm-size=2gb", | |
| "--rm", | |
| "--user", | |
| "13:17", | |
| "--mount", | |
| "type=bind,source=/host-src,target=/SRC", | |
| "--mount", | |
| "type=bind,source=/host-out,target=/OUT", | |
| "--cpus", | |
| "2", | |
| "my.docker.image", | |
| "/SRC/../do-stuff.sh", | |
| "--src", | |
| "/SRC", | |
| "--out", | |
| "/OUT" | |
| ], | |
| "env": { | |
| "CHROME_HEADLESS": "1", | |
| "DOCKER_CONFIG": "/home/chrome-bot/.docker", | |
| "PATH": "<PATH>:RECIPE_REPO[depot_tools]" | |
| }, | |
| "name": "do Docker stuff" | |
| }, | |
| { | |
| "name": "$result" | |
| } | |
| ] |