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 import listdir, walk
from os.path import exists, isfile, join from os.path import exists, isfile, join, islink
import requests import requests
import re import re
@ -59,13 +59,12 @@ def list_jobs(directory=".buildbot"):
list jobs found in a directory list jobs found in a directory
""" """
results = [] results = []
for _ in next(walk(directory))[1]: files = ["Dockerfile", "build.sh", "test.sh"]
if exists(join(directory, _, "Dockerfile")) and ( for file in files:
exists(join(directory, _, "build.sh")) print(join(directory, file))
or exists(join(directory, _, "test.sh")) print(exists(join(directory, file)))
): if exists(join(directory, file)) and not islink(join(directory, file)):
results.append(_) results.append(file)
return results 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 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( build_factory.addStep(steps.ShellCommand(
name="download worker", 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( build_factory.addStep(