1[ 2 { 3 "cmd": [], 4 "name": "Docker setup" 5 }, 6 { 7 "cmd": [ 8 "python", 9 "-u", 10 "import os\nprint('%d:%d' % (os.getuid(), os.getgid()))\n" 11 ], 12 "name": "Docker setup.Get uid and gid", 13 "~followup_annotations": [ 14 "@@@STEP_NEST_LEVEL@1@@@", 15 "@@@STEP_LOG_LINE@python.inline@import os@@@", 16 "@@@STEP_LOG_LINE@python.inline@print('%d:%d' % (os.getuid(), os.getgid()))@@@", 17 "@@@STEP_LOG_END@python.inline@@@" 18 ] 19 }, 20 { 21 "cmd": [ 22 "vpython", 23 "-u", 24 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 25 "--json-output", 26 "/path/to/tmp/json", 27 "ensure-directory", 28 "--mode", 29 "0777", 30 "/host-out" 31 ], 32 "infra_step": true, 33 "name": "Docker setup.mkdirs out_dir", 34 "~followup_annotations": [ 35 "@@@STEP_NEST_LEVEL@1@@@" 36 ] 37 }, 38 { 39 "cmd": [ 40 "chmod", 41 "777", 42 "/host-out" 43 ], 44 "infra_step": true, 45 "name": "Docker setup.chmod 777 /host-out", 46 "~followup_annotations": [ 47 "@@@STEP_NEST_LEVEL@1@@@" 48 ] 49 }, 50 { 51 "cmd": [ 52 "chmod", 53 "755", 54 "/host-src" 55 ], 56 "infra_step": true, 57 "name": "Docker setup.chmod 755 /host-src", 58 "~followup_annotations": [ 59 "@@@STEP_NEST_LEVEL@1@@@" 60 ] 61 }, 62 { 63 "cmd": [ 64 "chmod", 65 "0755", 66 "./do-stuff.sh" 67 ], 68 "infra_step": true, 69 "name": "Docker setup.chmod 0755 ./do-stuff.sh", 70 "~followup_annotations": [ 71 "@@@STEP_NEST_LEVEL@1@@@" 72 ] 73 }, 74 { 75 "cmd": [ 76 "vpython", 77 "-u", 78 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 79 "--json-output", 80 "/path/to/tmp/json", 81 "ensure-directory", 82 "--mode", 83 "0777", 84 "/copy-dst" 85 ], 86 "infra_step": true, 87 "name": "Docker setup.mkdirs /copy-dst", 88 "~followup_annotations": [ 89 "@@@STEP_NEST_LEVEL@1@@@" 90 ] 91 }, 92 { 93 "cmd": [ 94 "vpython", 95 "-u", 96 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 97 "--json-output", 98 "/path/to/tmp/json", 99 "copy", 100 "/copy-src/myfile", 101 "/copy-dst/myfile" 102 ], 103 "infra_step": true, 104 "name": "Docker setup.cp /copy-src/myfile /copy-dst/myfile", 105 "~followup_annotations": [ 106 "@@@STEP_NEST_LEVEL@1@@@" 107 ] 108 }, 109 { 110 "cmd": [ 111 "chmod", 112 "644", 113 "/copy-dst/myfile" 114 ], 115 "infra_step": true, 116 "name": "Docker setup.chmod 644 /copy-dst/myfile", 117 "~followup_annotations": [ 118 "@@@STEP_NEST_LEVEL@1@@@" 119 ] 120 }, 121 { 122 "cmd": [ 123 "chmod", 124 "-R", 125 "a+r", 126 "/host-src" 127 ], 128 "infra_step": true, 129 "name": "Docker setup.chmod -R a+r /host-src", 130 "~followup_annotations": [ 131 "@@@STEP_NEST_LEVEL@1@@@" 132 ] 133 }, 134 { 135 "cmd": [ 136 "docker", 137 "run", 138 "--shm-size=2gb", 139 "--rm", 140 "--user", 141 "13:17", 142 "--mount", 143 "type=bind,source=/host-src,target=/SRC", 144 "--mount", 145 "type=bind,source=/host-out,target=/OUT", 146 "--cpus", 147 "2", 148 "my.docker.image", 149 "/SRC/../do-stuff.sh", 150 "--src", 151 "/SRC", 152 "--out", 153 "/OUT" 154 ], 155 "env": { 156 "CHROME_HEADLESS": "1", 157 "DOCKER_CONFIG": "/home/chrome-bot/.docker", 158 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 159 }, 160 "name": "do Docker stuff" 161 }, 162 { 163 "name": "$result" 164 } 165]