25 lines
638 B
Python
25 lines
638 B
Python
#!/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
|
|
|
|
|