1[ 2 { 3 "cmd": [ 4 "vpython", 5 "-u", 6 "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", 7 "--json-output", 8 "/path/to/tmp/json", 9 "ensure-directory", 10 "--mode", 11 "0777", 12 "[START_DIR]\\tmp" 13 ], 14 "infra_step": true, 15 "name": "makedirs tmp_dir" 16 }, 17 { 18 "cmd": [ 19 "vpython", 20 "-u", 21 "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", 22 "--json-output", 23 "/path/to/tmp/json", 24 "copy", 25 "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", 26 "/path/to/tmp/" 27 ], 28 "infra_step": true, 29 "name": "Get skp VERSION", 30 "~followup_annotations": [ 31 "@@@STEP_LOG_LINE@VERSION@42@@@", 32 "@@@STEP_LOG_END@VERSION@@@" 33 ] 34 }, 35 { 36 "cmd": [ 37 "vpython", 38 "-u", 39 "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", 40 "--json-output", 41 "/path/to/tmp/json", 42 "copy", 43 "42", 44 "[START_DIR]\\tmp\\SKP_VERSION" 45 ], 46 "infra_step": true, 47 "name": "write SKP_VERSION", 48 "~followup_annotations": [ 49 "@@@STEP_LOG_LINE@SKP_VERSION@42@@@", 50 "@@@STEP_LOG_END@SKP_VERSION@@@" 51 ] 52 }, 53 { 54 "cmd": [ 55 "vpython", 56 "-u", 57 "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", 58 "--json-output", 59 "/path/to/tmp/json", 60 "copy", 61 "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", 62 "/path/to/tmp/" 63 ], 64 "infra_step": true, 65 "name": "Get skimage VERSION", 66 "~followup_annotations": [ 67 "@@@STEP_LOG_LINE@VERSION@42@@@", 68 "@@@STEP_LOG_END@VERSION@@@" 69 ] 70 }, 71 { 72 "cmd": [ 73 "vpython", 74 "-u", 75 "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", 76 "--json-output", 77 "/path/to/tmp/json", 78 "copy", 79 "42", 80 "[START_DIR]\\tmp\\SK_IMAGE_VERSION" 81 ], 82 "infra_step": true, 83 "name": "write SK_IMAGE_VERSION", 84 "~followup_annotations": [ 85 "@@@STEP_LOG_LINE@SK_IMAGE_VERSION@42@@@", 86 "@@@STEP_LOG_END@SK_IMAGE_VERSION@@@" 87 ] 88 }, 89 { 90 "cmd": [ 91 "vpython", 92 "-u", 93 "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", 94 "--json-output", 95 "/path/to/tmp/json", 96 "copy", 97 "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", 98 "/path/to/tmp/" 99 ], 100 "infra_step": true, 101 "name": "Get svg VERSION", 102 "~followup_annotations": [ 103 "@@@STEP_LOG_LINE@VERSION@42@@@", 104 "@@@STEP_LOG_END@VERSION@@@" 105 ] 106 }, 107 { 108 "cmd": [ 109 "vpython", 110 "-u", 111 "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", 112 "--json-output", 113 "/path/to/tmp/json", 114 "copy", 115 "42", 116 "[START_DIR]\\tmp\\SVG_VERSION" 117 ], 118 "infra_step": true, 119 "name": "write SVG_VERSION", 120 "~followup_annotations": [ 121 "@@@STEP_LOG_LINE@SVG_VERSION@42@@@", 122 "@@@STEP_LOG_END@SVG_VERSION@@@" 123 ] 124 }, 125 { 126 "cmd": [ 127 "vpython", 128 "-u", 129 "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", 130 "--json-output", 131 "/path/to/tmp/json", 132 "rmtree", 133 "[START_DIR]\\test" 134 ], 135 "infra_step": true, 136 "name": "rmtree test" 137 }, 138 { 139 "cmd": [ 140 "vpython", 141 "-u", 142 "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", 143 "--json-output", 144 "/path/to/tmp/json", 145 "ensure-directory", 146 "--mode", 147 "0777", 148 "[START_DIR]\\test" 149 ], 150 "infra_step": true, 151 "name": "makedirs test" 152 }, 153 { 154 "cmd": [ 155 "python", 156 "-u", 157 "\nimport contextlib\nimport math\nimport socket\nimport sys\nimport time\nimport urllib2\n\nHASHES_URL = sys.argv[1]\nRETRIES = 5\nTIMEOUT = 60\nWAIT_BASE = 15\n\nsocket.setdefaulttimeout(TIMEOUT)\nfor retry in range(RETRIES):\n try:\n with contextlib.closing(\n urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:\n hashes = w.read()\n with open(sys.argv[2], 'w') as f:\n f.write(hashes)\n break\n except Exception as e:\n print('Failed to get uninteresting hashes from %s:' % HASHES_URL)\n print(e)\n if retry == RETRIES:\n raise\n waittime = WAIT_BASE * math.pow(2, retry)\n print('Retry in %d seconds.' % waittime)\n time.sleep(waittime)\n", 158 "https://example.com/hashes.txt", 159 "[START_DIR]\\tmp\\uninteresting_hashes.txt" 160 ], 161 "env": { 162 "CHROME_HEADLESS": "1", 163 "PATH": "<PATH>;RECIPE_REPO[depot_tools]" 164 }, 165 "infra_step": true, 166 "name": "get uninteresting hashes", 167 "~followup_annotations": [ 168 "@@@STEP_LOG_LINE@python.inline@@@@", 169 "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", 170 "@@@STEP_LOG_LINE@python.inline@import math@@@", 171 "@@@STEP_LOG_LINE@python.inline@import socket@@@", 172 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 173 "@@@STEP_LOG_LINE@python.inline@import time@@@", 174 "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", 175 "@@@STEP_LOG_LINE@python.inline@@@@", 176 "@@@STEP_LOG_LINE@python.inline@HASHES_URL = sys.argv[1]@@@", 177 "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", 178 "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", 179 "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", 180 "@@@STEP_LOG_LINE@python.inline@@@@", 181 "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", 182 "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", 183 "@@@STEP_LOG_LINE@python.inline@ try:@@@", 184 "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", 185 "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", 186 "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", 187 "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[2], 'w') as f:@@@", 188 "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", 189 "@@@STEP_LOG_LINE@python.inline@ break@@@", 190 "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", 191 "@@@STEP_LOG_LINE@python.inline@ print('Failed to get uninteresting hashes from %s:' % HASHES_URL)@@@", 192 "@@@STEP_LOG_LINE@python.inline@ print(e)@@@", 193 "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", 194 "@@@STEP_LOG_LINE@python.inline@ raise@@@", 195 "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", 196 "@@@STEP_LOG_LINE@python.inline@ print('Retry in %d seconds.' % waittime)@@@", 197 "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", 198 "@@@STEP_LOG_END@python.inline@@@" 199 ] 200 }, 201 { 202 "cmd": [ 203 "python", 204 "-u", 205 "import os\nprint(os.environ.get('SWARMING_BOT_ID', ''))\n" 206 ], 207 "name": "get swarming bot id", 208 "~followup_annotations": [ 209 "@@@STEP_LOG_LINE@python.inline@import os@@@", 210 "@@@STEP_LOG_LINE@python.inline@print(os.environ.get('SWARMING_BOT_ID', ''))@@@", 211 "@@@STEP_LOG_END@python.inline@@@" 212 ] 213 }, 214 { 215 "cmd": [ 216 "python", 217 "-u", 218 "import os\nprint(os.environ.get('SWARMING_TASK_ID', ''))\n" 219 ], 220 "name": "get swarming task id", 221 "~followup_annotations": [ 222 "@@@STEP_LOG_LINE@python.inline@import os@@@", 223 "@@@STEP_LOG_LINE@python.inline@print(os.environ.get('SWARMING_TASK_ID', ''))@@@", 224 "@@@STEP_LOG_END@python.inline@@@" 225 ] 226 }, 227 { 228 "cmd": [ 229 "powershell", 230 "-ExecutionPolicy", 231 "Unrestricted", 232 "-File", 233 "RECIPE_MODULE[skia::flavor]\\resources\\win_run_and_check_log.ps1", 234 "[START_DIR]\\build\\dm", 235 "--example", 236 "--flags", 237 "--properties", 238 "bot", 239 "skia-bot-123", 240 "key1", 241 "value1", 242 "task", 243 "123456", 244 "--resourcePath", 245 "[START_DIR]\\skia\\resources", 246 "--skps", 247 "[START_DIR]\\skp", 248 "--images", 249 "[START_DIR]\\skimage\\dm", 250 "--colorImages", 251 "[START_DIR]\\skimage\\colorspace", 252 "--svgs", 253 "[START_DIR]\\svg\\svg", 254 "--uninterestingHashesFile", 255 "[START_DIR]\\tmp\\uninteresting_hashes.txt", 256 "--writePath", 257 "[START_DIR]\\[SWARM_OUT_DIR]" 258 ], 259 "env": { 260 "CHROME_HEADLESS": "1", 261 "PATH": "<PATH>;RECIPE_REPO[depot_tools]" 262 }, 263 "name": "dm" 264 }, 265 { 266 "name": "$result" 267 } 268]