update changes

This commit is contained in:
Muzahid 2022-03-01 20:32:02 +05:30
parent f98a503e2b
commit f165f98422
Signed by: cis-muzahid
GPG Key ID: 1DC85E7D3AB613EA
2 changed files with 13 additions and 9 deletions

View File

@ -1,5 +1,5 @@
from os import listdir, walk
from os.path import exists, isfile, join
from os.path import exists, isfile, join, islink
import requests
import re
@ -59,13 +59,12 @@ def list_jobs(directory=".buildbot"):
list jobs found in a directory
"""
results = []
for _ in next(walk(directory))[1]:
if exists(join(directory, _, "Dockerfile")) and (
exists(join(directory, _, "build.sh"))
or exists(join(directory, _, "test.sh"))
):
results.append(_)
files = ["Dockerfile", "build.sh", "test.sh"]
for file in files:
print(join(directory, file))
print(exists(join(directory, file)))
if exists(join(directory, file)) and not islink(join(directory, file)):
results.append(file)
return results

View File

@ -34,9 +34,14 @@ def add_parent_step(build_factory):
Add a step to the parent build factory that will trigger the child hooks
"""
build_factory.addStep(steps.ShellCommand(
name="create directory",
command=["mkdir", "-p", join(getenv['HOME'], '.local/bin') ]
))
build_factory.addStep(steps.ShellCommand(
name="download worker",
command=["mkdir", "-p", join(getenv['HOME'], '.local/bin'), "&&", "wget", "-O", "https://git.bitmessage.org/Bitmessage/buildbot_multibuild/raw/branch/master/lib/worker_multibuild.py", join(getenv['HOME'], '.local/bin/worker_multibuild.py')]
command=["wget", "-O", "https://git.bitmessage.org/Bitmessage/buildbot_multibuild/raw/branch/master/lib/worker_multibuild.py", join(getenv['HOME'], '.local/bin/worker_multibuild.py')]
))
build_factory.addStep(