summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-11-29 22:47:51 +0100
committerLars Wirzenius <liw@liw.fi>2017-11-29 22:47:51 +0100
commit07fb2ba9487ba8b924092570c74502d9ab6e4bf1 (patch)
tree69f84025f0acbcf51df2bad55a8d509fd2a73cbd
parent450b1747515e8955a3617d5c3618a50d96faa5d4 (diff)
parentbe93f161058a8a1c4cf848c1c88011f7376b0126 (diff)
downloadick2-07fb2ba9487ba8b924092570c74502d9ab6e4bf1.tar.gz
Merge branch 'liw/db'
-rw-r--r--NEWS5
-rwxr-xr-xicktool5
-rwxr-xr-xworker_manager7
3 files changed, 17 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 5e1250d..5b02268 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,11 @@ Version 0.18+git, not yet released
* Pipelines are now run in `/var/lib/ick/workspace`, and it gets
emptied when a pipeline starts to build.
+* Pipelines may now use a `debootstrap` step to have worker-manager
+ create a system tree with `debootsrap`. This requires the `_ickwm`
+ user (which worker-manager runs as) to have password-less sudo
+ access. The packaging does not arrange that yet.
+
Version 0.18, released 2017-11-25
----------------------------------
diff --git a/icktool b/icktool
index 0090b2b..8abac80 100755
--- a/icktool
+++ b/icktool
@@ -127,6 +127,11 @@ class Icktool(cliapp.Application):
for pipeline in pipelines:
build = self._get_latest_build(
project['project'], pipeline, builds)
+ if build is None:
+ build = {
+ 'build_id': 'never',
+ 'log': 'none',
+ }
status = self._get_pipeline_status(
project['project'], pipeline)
row = {
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'):