1[
2  {
3    "cmd": [
4      "python",
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]/cache/work"
13    ],
14    "infra_step": true,
15    "name": "makedirs checkout_path"
16  },
17  {
18    "cmd": [
19      "python",
20      "-u",
21      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
22      "--json-output",
23      "/path/to/tmp/json",
24      "remove",
25      "[START_DIR]/cache/work/.gclient_entries"
26    ],
27    "infra_step": true,
28    "name": "remove [START_DIR]/cache/work/.gclient_entries"
29  },
30  {
31    "cmd": [
32      "python",
33      "-u",
34      "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
35      "--spec-path",
36      "cache_dir = '[START_DIR]/cache/git'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]",
37      "--patch_root",
38      "skia",
39      "--revision_mapping_file",
40      "{\"got_revision\": \"skia\"}",
41      "--git-cache-dir",
42      "[START_DIR]/cache/git",
43      "--cleanup-dir",
44      "[CLEANUP]/bot_update",
45      "--output_json",
46      "/path/to/tmp/json",
47      "--patch_ref",
48      "https://skia.googlesource.com/skia.git@89/456789/12",
49      "--revision",
50      "skia@abc123"
51    ],
52    "cwd": "[START_DIR]/cache/work",
53    "env_prefixes": {
54      "PATH": [
55        "RECIPE_PACKAGE_REPO[depot_tools]"
56      ]
57    },
58    "infra_step": true,
59    "name": "bot_update",
60    "~followup_annotations": [
61      "@@@STEP_TEXT@Some step text@@@",
62      "@@@STEP_LOG_LINE@json.output@{@@@",
63      "@@@STEP_LOG_LINE@json.output@  \"did_run\": true, @@@",
64      "@@@STEP_LOG_LINE@json.output@  \"fixed_revisions\": {@@@",
65      "@@@STEP_LOG_LINE@json.output@    \"skia\": \"abc123\"@@@",
66      "@@@STEP_LOG_LINE@json.output@  }, @@@",
67      "@@@STEP_LOG_LINE@json.output@  \"manifest\": {@@@",
68      "@@@STEP_LOG_LINE@json.output@    \"skia\": {@@@",
69      "@@@STEP_LOG_LINE@json.output@      \"repository\": \"https://fake.org/skia.git\", @@@",
70      "@@@STEP_LOG_LINE@json.output@      \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
71      "@@@STEP_LOG_LINE@json.output@    }@@@",
72      "@@@STEP_LOG_LINE@json.output@  }, @@@",
73      "@@@STEP_LOG_LINE@json.output@  \"patch_failure\": false, @@@",
74      "@@@STEP_LOG_LINE@json.output@  \"patch_root\": \"skia\", @@@",
75      "@@@STEP_LOG_LINE@json.output@  \"properties\": {@@@",
76      "@@@STEP_LOG_LINE@json.output@    \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@",
77      "@@@STEP_LOG_LINE@json.output@    \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@",
78      "@@@STEP_LOG_LINE@json.output@  }, @@@",
79      "@@@STEP_LOG_LINE@json.output@  \"root\": \"skia\", @@@",
80      "@@@STEP_LOG_LINE@json.output@  \"source_manifest\": {@@@",
81      "@@@STEP_LOG_LINE@json.output@    \"directories\": {@@@",
82      "@@@STEP_LOG_LINE@json.output@      \"skia\": {@@@",
83      "@@@STEP_LOG_LINE@json.output@        \"git_checkout\": {@@@",
84      "@@@STEP_LOG_LINE@json.output@          \"repo_url\": \"https://fake.org/skia.git\", @@@",
85      "@@@STEP_LOG_LINE@json.output@          \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
86      "@@@STEP_LOG_LINE@json.output@        }@@@",
87      "@@@STEP_LOG_LINE@json.output@      }@@@",
88      "@@@STEP_LOG_LINE@json.output@    }, @@@",
89      "@@@STEP_LOG_LINE@json.output@    \"version\": 0@@@",
90      "@@@STEP_LOG_LINE@json.output@  }, @@@",
91      "@@@STEP_LOG_LINE@json.output@  \"step_text\": \"Some step text\"@@@",
92      "@@@STEP_LOG_LINE@json.output@}@@@",
93      "@@@STEP_LOG_END@json.output@@@",
94      "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
95      "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@"
96    ]
97  },
98  {
99    "cmd": [
100      "python",
101      "-u",
102      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
103      "--json-output",
104      "/path/to/tmp/json",
105      "ensure-directory",
106      "--mode",
107      "0777",
108      "[START_DIR]/[SWARM_OUT_DIR]"
109    ],
110    "infra_step": true,
111    "name": "mkdirs out_dir"
112  },
113  {
114    "cmd": [
115      "python",
116      "-u",
117      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
118      "--json-output",
119      "/path/to/tmp/json",
120      "rmtree",
121      "/tmp/lottie_files"
122    ],
123    "infra_step": true,
124    "name": "remove previous lottie files"
125  },
126  {
127    "cmd": [
128      "python",
129      "-u",
130      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
131      "--json-output",
132      "/path/to/tmp/json",
133      "copytree",
134      "[START_DIR]/lottie-samples",
135      "/tmp/lottie_files"
136    ],
137    "infra_step": true,
138    "name": "copy lottie files"
139  },
140  {
141    "cmd": [
142      "python",
143      "-u",
144      "\nimport os\nimport sys\n\nlottie_files_dir = sys.argv[1]\nout_dir = sys.argv[2]\nlottie_build = sys.argv[3]\n\n# Make sure all the lottie files are readable by everyone so we can see\n# them in the docker container.\nos.system('chmod 0644 %s/*' % lottie_files_dir)\nos.system('chmod 0644 %s/*' % lottie_build)\n\n# Prepare output folder, api.file.ensure_directory doesn't touch\n# the permissions of the out directory if it already exists.\n# This typically means that the non-privileged docker won't be able to write.\nos.chmod(out_dir, 0o777)\n",
145      "/tmp/lottie_files",
146      "[START_DIR]/[SWARM_OUT_DIR]",
147      "[START_DIR]/cache/work/lottie/build/player"
148    ],
149    "infra_step": true,
150    "name": "Set up for docker",
151    "~followup_annotations": [
152      "@@@STEP_LOG_LINE@python.inline@@@@",
153      "@@@STEP_LOG_LINE@python.inline@import os@@@",
154      "@@@STEP_LOG_LINE@python.inline@import sys@@@",
155      "@@@STEP_LOG_LINE@python.inline@@@@",
156      "@@@STEP_LOG_LINE@python.inline@lottie_files_dir = sys.argv[1]@@@",
157      "@@@STEP_LOG_LINE@python.inline@out_dir = sys.argv[2]@@@",
158      "@@@STEP_LOG_LINE@python.inline@lottie_build = sys.argv[3]@@@",
159      "@@@STEP_LOG_LINE@python.inline@@@@",
160      "@@@STEP_LOG_LINE@python.inline@# Make sure all the lottie files are readable by everyone so we can see@@@",
161      "@@@STEP_LOG_LINE@python.inline@# them in the docker container.@@@",
162      "@@@STEP_LOG_LINE@python.inline@os.system('chmod 0644 %s/*' % lottie_files_dir)@@@",
163      "@@@STEP_LOG_LINE@python.inline@os.system('chmod 0644 %s/*' % lottie_build)@@@",
164      "@@@STEP_LOG_LINE@python.inline@@@@",
165      "@@@STEP_LOG_LINE@python.inline@# Prepare output folder, api.file.ensure_directory doesn't touch@@@",
166      "@@@STEP_LOG_LINE@python.inline@# the permissions of the out directory if it already exists.@@@",
167      "@@@STEP_LOG_LINE@python.inline@# This typically means that the non-privileged docker won't be able to write.@@@",
168      "@@@STEP_LOG_LINE@python.inline@os.chmod(out_dir, 0o777)@@@",
169      "@@@STEP_LOG_END@python.inline@@@"
170    ]
171  },
172  {
173    "cmd": [
174      "python",
175      "-u",
176      "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n"
177    ],
178    "name": "get swarming bot id",
179    "stdout": "/path/to/tmp/",
180    "~followup_annotations": [
181      "@@@STEP_LOG_LINE@python.inline@import os@@@",
182      "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@",
183      "@@@STEP_LOG_END@python.inline@@@"
184    ]
185  },
186  {
187    "cmd": [
188      "python",
189      "-u",
190      "import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n"
191    ],
192    "name": "get swarming task id",
193    "stdout": "/path/to/tmp/",
194    "~followup_annotations": [
195      "@@@STEP_LOG_LINE@python.inline@import os@@@",
196      "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@",
197      "@@@STEP_LOG_END@python.inline@@@"
198    ]
199  },
200  {
201    "cmd": [
202      "docker",
203      "run",
204      "--shm-size=2gb",
205      "--rm",
206      "-v",
207      "[START_DIR]/cache/work:/SRC",
208      "-v",
209      "[START_DIR]/[SWARM_OUT_DIR]:/OUT",
210      "-v",
211      "[START_DIR]/cache/work/lottie/build/player:/LOTTIE_BUILD",
212      "-v",
213      "/tmp/lottie_files:/LOTTIE_FILES",
214      "gcr.io/skia-public/gold-lottie-web-puppeteer:v2",
215      "/SRC/skia/infra/lottiecap/docker/lottiecap_gold.sh",
216      "--builder",
217      "Test-Debian9-none-GCE-CPU-AVX2-x86_64-Debug-All-LottieWeb",
218      "--git_hash",
219      "abc123",
220      "--buildbucket_build_id",
221      "",
222      "--bot_id",
223      "",
224      "--task_id",
225      "",
226      "--browser",
227      "Chrome",
228      "--config",
229      "Debug",
230      "--issue",
231      "1234",
232      "--patchset",
233      "7",
234      "--patch_storage",
235      "gerrit"
236    ],
237    "env": {
238      "CHROME_HEADLESS": "1",
239      "DOCKER_CONFIG": "/home/chrome-bot/.docker",
240      "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
241    },
242    "name": "Create lottie-web Gold output with Docker"
243  },
244  {
245    "jsonResult": null,
246    "name": "$result"
247  }
248]