Skip to content
Snippets Groups Projects
Commit 73fec880 authored by s2870355's avatar s2870355
Browse files

also redirect sequential code

parent a70e6236
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,8 @@ def get_new_job(info : list[dict]) -> dict:
def run_cli_sequential(job : job_data) -> int:
exec_location = os.path.join("/usr/src/project/",os.path.relpath(job.location , dir_path)).replace("\\", "/")
disallowed = ['/', '\\', '-', '_', '.']
logfile= job.location.replace("\\", os.sep) + ".log"
f = open(logfile, 'w')
output = subprocess.call( \
args= \
......@@ -59,8 +61,10 @@ def run_cli_sequential(job : job_data) -> int:
"--entrypoint", "sh", \
job.image, \
"-c",
f"chmod +x {exec_location} && {exec_location} || sh {exec_location} || bash {exec_location}"])
return None, output
f"chmod +x {exec_location} && {exec_location} || sh {exec_location} || bash {exec_location}"],
stdout=f,
stderr=f)
return None, f
def listToString(s):
# initialize an empty string
......@@ -128,10 +132,10 @@ def run_ci(compile_info : list[job_data]) -> bool:
(job_info,task, output) = job
if task is None or task.poll() is not None:
job_info.finished = True
output.close()
if task is None:
job_info.failed = output
else:
output.close()
job_info.failed = (task.returncode != 0)
change = True
remove_able_jobs.append(job)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment