Skip to content

Commit

Permalink
Add healthcheck_repo command for changing the healthcheck repository
Browse files Browse the repository at this point in the history
Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
  • Loading branch information
aliceinwire committed Jul 13, 2022
1 parent e37d1fd commit 8dd5a30
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lavalab-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def main():
"allowed_hosts",
"build_args",
"groups",
"healthcheck_url", "host", "http_fqdn",
"healthcheck_url","healthcheck_repo", "host", "http_fqdn",
"loglevel", "lava-coordinator",
"name",
"persistent_db", "pg_lava_password",
Expand Down Expand Up @@ -558,6 +558,13 @@ def main():
if "build_args" in master:
dockcomp["services"]["healthcheck"]["build"]["args"] = master['build_args']
shutil.copytree("healthcheck", "output/%s/healthcheck" % host)
if "healthcheck_repo" in master:
healthcheckdir = "output/%s/healthcheck" % (host)
dockerfile = open("%s/Dockerfile" % healthcheckdir, "r+")
dockerfilec = re.sub('(RUN git clone ).*', '\g<1>%s' % master["healthcheck_repo"], dockerfile.read())
dockerfile.seek(0)
dockerfile.write(dockerfilec)
dockerfile.close()
if "extra_actions" in worker:
fp = open("%s/scripts/extra_actions" % workerdir, "w")
for eaction in worker["extra_actions"]:
Expand Down

0 comments on commit 8dd5a30

Please sign in to comment.