changed function to execute commands from runner script

This commit is contained in:
brb
2023-07-07 09:46:12 +02:00
parent f4a81b4b9b
commit bd5dc8fbc4
+1 -2
View File
@@ -5,7 +5,6 @@ from dotenv import load_dotenv
import logging
from typing import List
import os
from subprocess import run
from utils import clone_repository, load_runner_script
from setup_logging import setup_logging
@@ -81,7 +80,7 @@ def handle_event(request: GiteaRequest):
os.system(f'pip install -r {requirements_path}')
for cmd in pipeline.script:
try:
run(cmd)
os.system(cmd)
except Exception as e:
raise HTTPException(
status_code=503,