1[ 2 { 3 "cmd": [ 4 "python", 5 "-u", 6 "\nimport subprocess\nimport sys\n\nwhich = 'where' if sys.platform == 'win32' else 'which'\ngit = subprocess.check_output([which, 'git'])\nprint 'git was found at %s' % git\nif 'cipd_bin_packages' not in git:\n print >> sys.stderr, 'Git must be obtained through CIPD.'\n sys.exit(1)\n" 7 ], 8 "env": { 9 "CHROME_HEADLESS": "1", 10 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 11 }, 12 "name": "Assert that Git is from CIPD", 13 "~followup_annotations": [ 14 "@@@STEP_LOG_LINE@python.inline@@@@", 15 "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", 16 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 17 "@@@STEP_LOG_LINE@python.inline@@@@", 18 "@@@STEP_LOG_LINE@python.inline@which = 'where' if sys.platform == 'win32' else 'which'@@@", 19 "@@@STEP_LOG_LINE@python.inline@git = subprocess.check_output([which, 'git'])@@@", 20 "@@@STEP_LOG_LINE@python.inline@print 'git was found at %s' % git@@@", 21 "@@@STEP_LOG_LINE@python.inline@if 'cipd_bin_packages' not in git:@@@", 22 "@@@STEP_LOG_LINE@python.inline@ print >> sys.stderr, 'Git must be obtained through CIPD.'@@@", 23 "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", 24 "@@@STEP_LOG_END@python.inline@@@" 25 ] 26 }, 27 { 28 "cmd": [ 29 "vpython", 30 "-u", 31 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 32 "--json-output", 33 "/path/to/tmp/json", 34 "ensure-directory", 35 "--mode", 36 "0777", 37 "[START_DIR]/cache/work" 38 ], 39 "infra_step": true, 40 "name": "makedirs checkout_path" 41 }, 42 { 43 "cmd": [ 44 "vpython", 45 "-u", 46 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 47 "--json-output", 48 "/path/to/tmp/json", 49 "remove", 50 "[START_DIR]/cache/work/.gclient_entries" 51 ], 52 "infra_step": true, 53 "name": "remove [START_DIR]/cache/work/.gclient_entries" 54 }, 55 { 56 "cmd": [ 57 "python", 58 "-u", 59 "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", 60 "--spec-path", 61 "cache_dir = '[START_DIR]/cache/git'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]", 62 "--patch_root", 63 "skia", 64 "--revision_mapping_file", 65 "{\"got_revision\": \"skia\"}", 66 "--git-cache-dir", 67 "[START_DIR]/cache/git", 68 "--cleanup-dir", 69 "[CLEANUP]/bot_update", 70 "--output_json", 71 "/path/to/tmp/json", 72 "--revision", 73 "skia@abc123" 74 ], 75 "cwd": "[START_DIR]/cache/work", 76 "env": { 77 "GIT_HTTP_LOW_SPEED_LIMIT": "102400", 78 "GIT_HTTP_LOW_SPEED_TIME": "1800" 79 }, 80 "env_suffixes": { 81 "DEPOT_TOOLS_UPDATE": [ 82 "0" 83 ], 84 "PATH": [ 85 "RECIPE_REPO[depot_tools]" 86 ] 87 }, 88 "infra_step": true, 89 "name": "bot_update", 90 "~followup_annotations": [ 91 "@@@STEP_TEXT@Some step text@@@", 92 "@@@STEP_LOG_LINE@json.output@{@@@", 93 "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", 94 "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", 95 "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@", 96 "@@@STEP_LOG_LINE@json.output@ }, @@@", 97 "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", 98 "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", 99 "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@", 100 "@@@STEP_LOG_LINE@json.output@ \"revision\": \"abc123\"@@@", 101 "@@@STEP_LOG_LINE@json.output@ }@@@", 102 "@@@STEP_LOG_LINE@json.output@ }, @@@", 103 "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", 104 "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@", 105 "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", 106 "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"abc123\", @@@", 107 "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@", 108 "@@@STEP_LOG_LINE@json.output@ }, @@@", 109 "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@", 110 "@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@", 111 "@@@STEP_LOG_LINE@json.output@ \"directories\": {@@@", 112 "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@", 113 "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", 114 "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/skia.git\", @@@", 115 "@@@STEP_LOG_LINE@json.output@ \"revision\": \"abc123\"@@@", 116 "@@@STEP_LOG_LINE@json.output@ }@@@", 117 "@@@STEP_LOG_LINE@json.output@ }@@@", 118 "@@@STEP_LOG_LINE@json.output@ }, @@@", 119 "@@@STEP_LOG_LINE@json.output@ \"version\": 0@@@", 120 "@@@STEP_LOG_LINE@json.output@ }, @@@", 121 "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", 122 "@@@STEP_LOG_LINE@json.output@}@@@", 123 "@@@STEP_LOG_END@json.output@@@", 124 "@@@SET_BUILD_PROPERTY@got_revision@\"abc123\"@@@", 125 "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@" 126 ] 127 }, 128 { 129 "cmd": [ 130 "vpython", 131 "-u", 132 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 133 "--json-output", 134 "/path/to/tmp/json", 135 "ensure-directory", 136 "--mode", 137 "0777", 138 "[START_DIR]/tmp" 139 ], 140 "infra_step": true, 141 "name": "makedirs tmp_dir" 142 }, 143 { 144 "cmd": [ 145 "vpython", 146 "-u", 147 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 148 "--json-output", 149 "/path/to/tmp/json", 150 "ensure-directory", 151 "--mode", 152 "0777", 153 "[START_DIR]/cache/docker/skqp" 154 ], 155 "infra_step": true, 156 "name": "mkdirs out_dir" 157 }, 158 { 159 "cmd": [ 160 "python", 161 "-u", 162 "[START_DIR]/cache/work/skia/bin/fetch-gn" 163 ], 164 "cwd": "[START_DIR]/cache/work/skia", 165 "env": { 166 "CHROME_HEADLESS": "1", 167 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 168 }, 169 "infra_step": true, 170 "name": "fetch-gn" 171 }, 172 { 173 "cmd": [ 174 "docker", 175 "run", 176 "--rm", 177 "--workdir", 178 "/SRC/skia/infra/skqp", 179 "--volume", 180 "[START_DIR]/cache/work:/SRC", 181 "--volume", 182 "[START_DIR]/cache/docker/skqp:/OUT", 183 "gcr.io/skia-public/android-skqp:r20_v1", 184 "./build_apk.sh" 185 ], 186 "env": { 187 "CHROME_HEADLESS": "1", 188 "DOCKER_CONFIG": "/home/chrome-bot/.docker", 189 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 190 }, 191 "name": "Build SKQP apk with Docker" 192 }, 193 { 194 "cmd": [ 195 "python", 196 "-u", 197 "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products = ['*.apk']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n # Because Docker usually has some strange permissions (like root\n # ownership), we'd rather not keep those around. copyfile doesn't\n # keep the metadata around, so that helps us.\n shutil.copyfile(f, dst_path)\n", 198 "[START_DIR]/cache/docker/skqp", 199 "[START_DIR]/[SWARM_OUT_DIR]" 200 ], 201 "infra_step": true, 202 "name": "copy apk output", 203 "~followup_annotations": [ 204 "@@@STEP_LOG_LINE@python.inline@import errno@@@", 205 "@@@STEP_LOG_LINE@python.inline@import glob@@@", 206 "@@@STEP_LOG_LINE@python.inline@import os@@@", 207 "@@@STEP_LOG_LINE@python.inline@import shutil@@@", 208 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 209 "@@@STEP_LOG_LINE@python.inline@@@@", 210 "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@", 211 "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@", 212 "@@@STEP_LOG_LINE@python.inline@build_products = ['*.apk']@@@", 213 "@@@STEP_LOG_LINE@python.inline@@@@", 214 "@@@STEP_LOG_LINE@python.inline@try:@@@", 215 "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@", 216 "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@", 217 "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@", 218 "@@@STEP_LOG_LINE@python.inline@ raise@@@", 219 "@@@STEP_LOG_LINE@python.inline@@@@", 220 "@@@STEP_LOG_LINE@python.inline@for pattern in build_products:@@@", 221 "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@", 222 "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@", 223 "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@", 224 "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@", 225 "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@", 226 "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@", 227 "@@@STEP_LOG_LINE@python.inline@ # Because Docker usually has some strange permissions (like root@@@", 228 "@@@STEP_LOG_LINE@python.inline@ # ownership), we'd rather not keep those around. copyfile doesn't@@@", 229 "@@@STEP_LOG_LINE@python.inline@ # keep the metadata around, so that helps us.@@@", 230 "@@@STEP_LOG_LINE@python.inline@ shutil.copyfile(f, dst_path)@@@", 231 "@@@STEP_LOG_END@python.inline@@@" 232 ] 233 }, 234 { 235 "name": "$result" 236 } 237]