From 6cb6b47fd9f5e10099abccded6b0d37a1156626e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0urda?= Date: Fri, 17 Dec 2021 11:03:20 +0800 Subject: [PATCH] Starting code --- multibuild.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 multibuild.py diff --git a/multibuild.py b/multibuild.py new file mode 100644 index 0000000..00bf8e9 --- /dev/null +++ b/multibuild.py @@ -0,0 +1,24 @@ +#!/usr/bin/python3 + +# TODO: change "ghcontext" in master.cfg to interpolate the job name +# TODO: write upload script +# TODO: write hook (perhaps the default hook is ok), authentication for hook +# TODO: write hook job, maybe also a dockerfile? +# TODO: what to do about non-docker jobs + +from os import walk +from os.path import exists, join + + +def list_jobs(dir="."): + results = [] + for d in next(walk(dir()))[1]: + if exists(join(dir, d, "Dockerfile")) \ + and (exists(join(dir, d, "build.sh")) + or exists(join(dir, d, "test.sh")) + ): + results.append(d) + + return results + +