diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-11-29 22:11:17 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-11-29 22:46:13 +0100 |
commit | a0077f41afb6868568ff9bd1ea0c82e0a54934ce (patch) | |
tree | cfc04b620aa903e17570d19bdb5d0b5370124813 /worker_manager | |
parent | bc1fea905ed3e56eb3683a64638943ec24a653f2 (diff) | |
download | ick2-a0077f41afb6868568ff9bd1ea0c82e0a54934ce.tar.gz |
Add: built-in debootstrap step
Diffstat (limited to 'worker_manager')
-rwxr-xr-x | worker_manager | 7 |
1 files changed, 7 insertions, 0 deletions
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'): |