9 out_dir = api.vars.cache_dir.join('docker', 'pathkit')
10 configuration = api.vars.builder_cfg.get('configuration', '')
11 target_arch = api.vars.builder_cfg.get('target_arch', '')
12
13
14
15
16
17
18 api.file.ensure_directory('mkdirs out_dir', out_dir, mode=0o777)
19
20
21
22
23
24
25
26
27
28
29
30 cmd = ['docker', 'run', '--rm', '--volume', '%s:/SRC' % checkout_root,
31 '--volume', '%s:/OUT' % out_dir,
32 DOCKER_IMAGE, INNER_BUILD_SCRIPT]
33 if configuration == 'Debug':
34 cmd.append('debug')
35 if target_arch == 'asmjs':
36 cmd.append('asm.js')
37
38 env = {'DOCKER_CONFIG': '/home/chrome-bot/.docker'}
39 with api.env(env):
40 api.run(
41 api.step,
42 'Build PathKit with Docker',
43 cmd=cmd)
44
45
def compile_fn(api, checkout_root, _ignore)