fix issue for the doeckerfile read and download worker path

This commit is contained in:
Muzahid 2022-02-24 17:07:34 +05:30
parent 98c4b1261f
commit 76f54b3f38
Signed by: cis-muzahid
GPG Key ID: 1DC85E7D3AB613EA
2 changed files with 14 additions and 14 deletions

View File

@ -76,19 +76,19 @@ def _get_dockerfile_contents(jobname, os_codename='bionic'):
res = ""
with open(join(path + jobname), "r") as file:
contents = file.read()
# accept any line containing FROM or RUN keywords
# re.match(r"(?m)^(FROM|RUN).*$", contents)
for i in range(len(contents)):
if re.match(r"(?m)^(FROM|RUN).*$", contents[i]):
res += contents[i]
j = i
while True:
if "\\" in contents[j]:
res += contents[j+1]
j = j + 1
else:
break
# accept any line containing FROM and RUN keywords
res = ""
inside_allowed_command = False
for line in contents:
if re.match(r"(?m)^(FROM|RUN).*$", line):
inside_allowed_command = True
if inside_allowed_command:
res += line
l = line.strip()
if l.endswith("\\") or l.endswith("\\\n"):
continue
else:
inside_allowed_command = False
return res + dockerfile_extra_contents[os_codename]

View File

@ -41,7 +41,7 @@ def add_parent_step(build_factory):
build_factory.addStep(steps.ShellCommand(
name="download worker",
command=["sudo", "wget", "-O", "https://git.bitmessage.org/Bitmessage/buildbot_multibuild/raw/branch/master/lib/worker_multibuild.py", "worker_multibuild.py"]
command=["sudo", "wget", "-O", "https://git.bitmessage.org/Bitmessage/buildbot_multibuild/raw/branch/master/lib/worker_multibuild.py", ".local/bin/worker_multibuild.py"]
))
# build_factory.addStep(