| 1 |
# Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 |
# Use of this source code is governed by a BSD-style license that can be |
| 3 |
# found in the LICENSE file. |
| 4 |
|
| 5 |
|
| 6 |
DEPS = [ |
| 7 |
'docker', |
| 8 |
'recipe_engine/context', |
| 9 |
'recipe_engine/properties', |
| 10 |
'recipe_engine/step', |
| 11 |
'vars', |
| 12 |
] |
| 13 |
|
| 14 |
|
| 15 |
def RunSteps(api): |
| 16 |
api.vars.setup() |
| 17 |
api.docker.run( |
| 18 |
name='do Docker stuff', |
| 19 |
docker_image='my.docker.image', |
| 20 |
src_dir='/host-src', |
| 21 |
out_dir='/host-out', |
| 22 |
script='./do-stuff.sh', |
| 23 |
args=['--src', api.docker.mount_src(), '--out', api.docker.mount_out()], |
| 24 |
docker_args=['--cpus', '2'], |
| 25 |
copies=[{'src': '/copy-src/myfile', 'dst': '/copy-dst/myfile'}], |
| 26 |
recursive_read=['/host-src'], |
| 27 |
env={'ENV_VAR': 'VALUE'}, |
| 28 |
) |
| 29 |
|
| 30 |
def GenTests(api): |
| 31 |
yield (api.test('test') + |
| 32 |
api.properties(buildername='Test-Debian10-EMCC-GCE-GPU-WEBGL1-wasm-Debug-All-CanvasKit', |
| 33 |
buildbucket_build_id='123454321', |
| 34 |
revision='abc123', |
| 35 |
path_config='kitchen', |
| 36 |
gold_hashes_url='https://example.com/hashes.txt', |
| 37 |
swarm_out_dir='[SWARM_OUT_DIR]', |
| 38 |
task_id='task_12345') |
| 39 |
) |