|
|
@ -54,6 +54,7 @@ class App: |
|
|
|
self.restart_under_venv() |
|
|
|
else: |
|
|
|
print("Running under virtual environment") |
|
|
|
# TODO: yaml is only used in venv, yet installed as dependency in setup.cfg |
|
|
|
self.pip_install("pyyaml", "yaml") |
|
|
|
|
|
|
|
from jobparser import JobParser |
|
|
@ -67,7 +68,8 @@ class App: |
|
|
|
jobParser.jobs[step].run_commands(self.__gen_env(args.env)) |
|
|
|
print(f"Step {step}: SUCCESS") |
|
|
|
else: |
|
|
|
raise Exception(f"Step {step} not found in {args.input}") |
|
|
|
print(f"Step {step} not found in {args.input}") |
|
|
|
exit(1) |
|
|
|
|
|
|
|
def main(): |
|
|
|
pathToScriptDir = os.path.dirname(os.path.realpath(__file__)) |
|
|
@ -79,6 +81,9 @@ def main(): |
|
|
|
parser.add_argument("-i", "--input", default="ci.yaml") |
|
|
|
parser.add_argument("-e", "--env", nargs='*', default=[]) |
|
|
|
args = parser.parse_args() |
|
|
|
if not os.path.isfile(args.input): |
|
|
|
print(f"No such file: {args.input}") |
|
|
|
exit(1) |
|
|
|
app.run(args, repoDir) |
|
|
|
|
|
|
|
if __name__ == "__main__": |