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/lottie-samples/VERSION", 26 "/path/to/tmp/" 27 ], 28 "infra_step": true, 29 "name": "Get lottie-samples 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/LOTTIE_VERSION" 45 ], 46 "infra_step": true, 47 "name": "write LOTTIE_VERSION", 48 "~followup_annotations": [ 49 "@@@STEP_LOG_LINE@LOTTIE_VERSION@42@@@", 50 "@@@STEP_LOG_END@LOTTIE_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 "rmtree", 61 "[START_DIR]/test" 62 ], 63 "infra_step": true, 64 "name": "rmtree test" 65 }, 66 { 67 "cmd": [ 68 "vpython", 69 "-u", 70 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 71 "--json-output", 72 "/path/to/tmp/json", 73 "ensure-directory", 74 "--mode", 75 "0777", 76 "[START_DIR]/test" 77 ], 78 "infra_step": true, 79 "name": "makedirs test" 80 }, 81 { 82 "cmd": [ 83 "python", 84 "-u", 85 "\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", 86 "https://example.com/hashes.txt", 87 "[START_DIR]/tmp/uninteresting_hashes.txt" 88 ], 89 "env": { 90 "CHROME_HEADLESS": "1", 91 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 92 }, 93 "infra_step": true, 94 "name": "get uninteresting hashes", 95 "~followup_annotations": [ 96 "@@@STEP_LOG_LINE@python.inline@@@@", 97 "@@@STEP_LOG_LINE@python.inline@import contextlib@@@", 98 "@@@STEP_LOG_LINE@python.inline@import math@@@", 99 "@@@STEP_LOG_LINE@python.inline@import socket@@@", 100 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 101 "@@@STEP_LOG_LINE@python.inline@import time@@@", 102 "@@@STEP_LOG_LINE@python.inline@import urllib2@@@", 103 "@@@STEP_LOG_LINE@python.inline@@@@", 104 "@@@STEP_LOG_LINE@python.inline@HASHES_URL = sys.argv[1]@@@", 105 "@@@STEP_LOG_LINE@python.inline@RETRIES = 5@@@", 106 "@@@STEP_LOG_LINE@python.inline@TIMEOUT = 60@@@", 107 "@@@STEP_LOG_LINE@python.inline@WAIT_BASE = 15@@@", 108 "@@@STEP_LOG_LINE@python.inline@@@@", 109 "@@@STEP_LOG_LINE@python.inline@socket.setdefaulttimeout(TIMEOUT)@@@", 110 "@@@STEP_LOG_LINE@python.inline@for retry in range(RETRIES):@@@", 111 "@@@STEP_LOG_LINE@python.inline@ try:@@@", 112 "@@@STEP_LOG_LINE@python.inline@ with contextlib.closing(@@@", 113 "@@@STEP_LOG_LINE@python.inline@ urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:@@@", 114 "@@@STEP_LOG_LINE@python.inline@ hashes = w.read()@@@", 115 "@@@STEP_LOG_LINE@python.inline@ with open(sys.argv[2], 'w') as f:@@@", 116 "@@@STEP_LOG_LINE@python.inline@ f.write(hashes)@@@", 117 "@@@STEP_LOG_LINE@python.inline@ break@@@", 118 "@@@STEP_LOG_LINE@python.inline@ except Exception as e:@@@", 119 "@@@STEP_LOG_LINE@python.inline@ print('Failed to get uninteresting hashes from %s:' % HASHES_URL)@@@", 120 "@@@STEP_LOG_LINE@python.inline@ print(e)@@@", 121 "@@@STEP_LOG_LINE@python.inline@ if retry == RETRIES:@@@", 122 "@@@STEP_LOG_LINE@python.inline@ raise@@@", 123 "@@@STEP_LOG_LINE@python.inline@ waittime = WAIT_BASE * math.pow(2, retry)@@@", 124 "@@@STEP_LOG_LINE@python.inline@ print('Retry in %d seconds.' % waittime)@@@", 125 "@@@STEP_LOG_LINE@python.inline@ time.sleep(waittime)@@@", 126 "@@@STEP_LOG_END@python.inline@@@" 127 ] 128 }, 129 { 130 "cmd": [ 131 "python", 132 "-u", 133 "import os\nprint(os.environ.get('SWARMING_BOT_ID', ''))\n" 134 ], 135 "name": "get swarming bot id", 136 "~followup_annotations": [ 137 "@@@STEP_LOG_LINE@python.inline@import os@@@", 138 "@@@STEP_LOG_LINE@python.inline@print(os.environ.get('SWARMING_BOT_ID', ''))@@@", 139 "@@@STEP_LOG_END@python.inline@@@" 140 ] 141 }, 142 { 143 "cmd": [ 144 "python", 145 "-u", 146 "import os\nprint(os.environ.get('SWARMING_TASK_ID', ''))\n" 147 ], 148 "name": "get swarming task id", 149 "~followup_annotations": [ 150 "@@@STEP_LOG_LINE@python.inline@import os@@@", 151 "@@@STEP_LOG_LINE@python.inline@print(os.environ.get('SWARMING_TASK_ID', ''))@@@", 152 "@@@STEP_LOG_END@python.inline@@@" 153 ] 154 }, 155 { 156 "cmd": [ 157 "python", 158 "-u", 159 "RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py", 160 "[START_DIR]", 161 "catchsegv", 162 "[START_DIR]/build/dm", 163 "--example", 164 "--flags", 165 "--properties", 166 "bot", 167 "skia-bot-123", 168 "key1", 169 "value1", 170 "task", 171 "123456", 172 "--resourcePath", 173 "[START_DIR]/skia/resources", 174 "--lotties", 175 "[START_DIR]/skia/resources/skottie", 176 "[START_DIR]/lottie-samples", 177 "--uninterestingHashesFile", 178 "[START_DIR]/tmp/uninteresting_hashes.txt", 179 "--writePath", 180 "[START_DIR]/[SWARM_OUT_DIR]" 181 ], 182 "cwd": "[START_DIR]/skia", 183 "env": { 184 "CHROME_HEADLESS": "1", 185 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 186 }, 187 "name": "symbolized dm" 188 }, 189 { 190 "cmd": [ 191 "vpython", 192 "-u", 193 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 194 "--json-output", 195 "/path/to/tmp/json", 196 "glob", 197 "[START_DIR]/[SWARM_OUT_DIR]", 198 "*.png" 199 ], 200 "infra_step": true, 201 "name": "find .png images", 202 "~followup_annotations": [ 203 "@@@STEP_LOG_LINE@glob@[START_DIR]/[SWARM_OUT_DIR]/someimage.png@@@", 204 "@@@STEP_LOG_END@glob@@@" 205 ] 206 }, 207 { 208 "cmd": [ 209 "gsutil", 210 "-m", 211 "cp", 212 "[START_DIR]/[SWARM_OUT_DIR]/*.png", 213 "gs://skia-infra-gm/dm-images-v1" 214 ], 215 "name": "upload .png images" 216 }, 217 { 218 "cmd": [ 219 "gsutil", 220 "cp", 221 "-Z", 222 "[START_DIR]/[SWARM_OUT_DIR]/dm.json", 223 "gs://skia-infra-gm/trybot/dm-json-v1/2012/05/14/12/1234_7/Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Lottie/1337000001/dm.json" 224 ], 225 "name": "upload dm.json" 226 }, 227 { 228 "name": "$result" 229 } 230]