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 "python", 30 "-u", 31 "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", 32 "--path", 33 "[START_DIR]/skia", 34 "--url", 35 "https://skia.googlesource.com/skia.git" 36 ], 37 "name": "git setup" 38 }, 39 { 40 "cmd": [ 41 "git", 42 "fetch", 43 "origin", 44 "abc123", 45 "--progress" 46 ], 47 "cwd": "[START_DIR]/skia", 48 "env": { 49 "PATH": "RECIPE_REPO[depot_tools]:<PATH>" 50 }, 51 "infra_step": true, 52 "name": "git fetch" 53 }, 54 { 55 "cmd": [ 56 "git", 57 "checkout", 58 "-f", 59 "FETCH_HEAD" 60 ], 61 "cwd": "[START_DIR]/skia", 62 "infra_step": true, 63 "name": "git checkout" 64 }, 65 { 66 "cmd": [ 67 "git", 68 "rev-parse", 69 "HEAD" 70 ], 71 "cwd": "[START_DIR]/skia", 72 "infra_step": true, 73 "name": "read revision", 74 "~followup_annotations": [ 75 "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@" 76 ] 77 }, 78 { 79 "cmd": [ 80 "git", 81 "clean", 82 "-f", 83 "-d", 84 "-x" 85 ], 86 "cwd": "[START_DIR]/skia", 87 "infra_step": true, 88 "name": "git clean" 89 }, 90 { 91 "cmd": [ 92 "git", 93 "fetch", 94 "origin", 95 "refs/changes/89/456789/12" 96 ], 97 "cwd": "[START_DIR]/skia", 98 "infra_step": true, 99 "name": "git fetch (2)" 100 }, 101 { 102 "cmd": [ 103 "git", 104 "checkout", 105 "FETCH_HEAD" 106 ], 107 "cwd": "[START_DIR]/skia", 108 "infra_step": true, 109 "name": "git checkout (2)" 110 }, 111 { 112 "cmd": [ 113 "git", 114 "rebase", 115 "abc123" 116 ], 117 "cwd": "[START_DIR]/skia", 118 "infra_step": true, 119 "name": "git rebase" 120 }, 121 { 122 "cmd": [ 123 "vpython", 124 "-u", 125 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 126 "--json-output", 127 "/path/to/tmp/json", 128 "ensure-directory", 129 "--mode", 130 "0777", 131 "[START_DIR]/tmp" 132 ], 133 "infra_step": true, 134 "name": "makedirs tmp_dir" 135 }, 136 { 137 "name": "$result" 138 } 139]