fix issue for the doeckerfile read and download worker path
This commit is contained in:
parent
98c4b1261f
commit
76f54b3f38
|
@ -76,19 +76,19 @@ def _get_dockerfile_contents(jobname, os_codename='bionic'):
|
||||||
res = ""
|
res = ""
|
||||||
with open(join(path + jobname), "r") as file:
|
with open(join(path + jobname), "r") as file:
|
||||||
contents = file.read()
|
contents = file.read()
|
||||||
# accept any line containing FROM or RUN keywords
|
# accept any line containing FROM and RUN keywords
|
||||||
# re.match(r"(?m)^(FROM|RUN).*$", contents)
|
res = ""
|
||||||
|
inside_allowed_command = False
|
||||||
for i in range(len(contents)):
|
for line in contents:
|
||||||
if re.match(r"(?m)^(FROM|RUN).*$", contents[i]):
|
if re.match(r"(?m)^(FROM|RUN).*$", line):
|
||||||
res += contents[i]
|
inside_allowed_command = True
|
||||||
j = i
|
if inside_allowed_command:
|
||||||
while True:
|
res += line
|
||||||
if "\\" in contents[j]:
|
l = line.strip()
|
||||||
res += contents[j+1]
|
if l.endswith("\\") or l.endswith("\\\n"):
|
||||||
j = j + 1
|
continue
|
||||||
else:
|
else:
|
||||||
break
|
inside_allowed_command = False
|
||||||
|
|
||||||
return res + dockerfile_extra_contents[os_codename]
|
return res + dockerfile_extra_contents[os_codename]
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ def add_parent_step(build_factory):
|
||||||
|
|
||||||
build_factory.addStep(steps.ShellCommand(
|
build_factory.addStep(steps.ShellCommand(
|
||||||
name="download worker",
|
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(
|
# build_factory.addStep(
|
||||||
|
|
Loading…
Reference in New Issue