From a0077f41afb6868568ff9bd1ea0c82e0a54934ce Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 29 Nov 2017 22:11:17 +0100 Subject: Add: built-in debootstrap step --- worker_manager | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'worker_manager') diff --git a/worker_manager b/worker_manager index bf7f14e..f517196 100755 --- a/worker_manager +++ b/worker_manager @@ -220,12 +220,19 @@ class WorkerManager(cliapp.Application): def run_python(python_cmd): return run_with_interp(['python3', '-c'], python_cmd) + def run_debootstrap(step): + shell_cmd = "sudo debootstrap '{}' . '{}'".format( + step['debootstrap'], step.get('mirror', 'NOMIRROR')) + run_shell(shell_cmd) + def run_cmd(step): logging.info('Running step: %r', step) if 'shell' in step: run_shell(step['shell']) elif 'python' in step: run_python(step['python']) + elif 'debootstrap' in step: + run_debootstrap(step) exit_code = 0 if work.get('fresh_workspace'): -- cgit v1.2.1