6 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
12 "[START_DIR]/cache/docker/pathkit"
15 "name": "mkdirs out_dir"
23 "[START_DIR]/cache/work:/SRC",
25 "[START_DIR]/cache/docker/pathkit:/OUT",
26 "gcr.io/skia-public/emsdk-base:3.1.3_v1",
27 "/SRC/skia/infra/pathkit/build_pathkit.sh",
31 "CHROME_HEADLESS": "1",
32 "DOCKER_CONFIG": "/home/chrome-bot/.docker",
33 "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
35 "name": "Build PathKit with Docker"
41 "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products = ['pathkit.*']\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",
42 "[START_DIR]/cache/docker/pathkit",
43 "[START_DIR]/[SWARM_OUT_DIR]/out/Release"
46 "name": "copy wasm output",
47 "~followup_annotations": [
48 "@@@STEP_LOG_LINE@python.inline@import errno@@@",
49 "@@@STEP_LOG_LINE@python.inline@import glob@@@",
50 "@@@STEP_LOG_LINE@python.inline@import os@@@",
51 "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
52 "@@@STEP_LOG_LINE@python.inline@import sys@@@",
53 "@@@STEP_LOG_LINE@python.inline@@@@",
54 "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
55 "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
56 "@@@STEP_LOG_LINE@python.inline@build_products = ['pathkit.*']@@@",
57 "@@@STEP_LOG_LINE@python.inline@@@@",
58 "@@@STEP_LOG_LINE@python.inline@try:@@@",
59 "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@",
60 "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
61 "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@",
62 "@@@STEP_LOG_LINE@python.inline@ raise@@@",
63 "@@@STEP_LOG_LINE@python.inline@@@@",
64 "@@@STEP_LOG_LINE@python.inline@for pattern in build_products:@@@",
65 "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@",
66 "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@",
67 "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
68 "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@",
69 "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@",
70 "@@@STEP_LOG_LINE@python.inline@ print('Copying build product %s to %s' % (f, dst_path))@@@",
71 "@@@STEP_LOG_LINE@python.inline@ # Because Docker usually has some strange permissions (like root@@@",
72 "@@@STEP_LOG_LINE@python.inline@ # ownership), we'd rather not keep those around. copyfile doesn't@@@",
73 "@@@STEP_LOG_LINE@python.inline@ # keep the metadata around, so that helps us.@@@",
74 "@@@STEP_LOG_LINE@python.inline@ shutil.copyfile(f, dst_path)@@@",
75 "@@@STEP_LOG_END@python.inline@@@"