Compare commits

..
3 Commits
Author SHA1 Message Date
brb 9513eb488b adapted to new definition 2023-07-06 15:58:25 +02:00
brb a51c49e8f4 adapted to new definition 2023-07-06 15:58:15 +02:00
brb dba476e78a updated definition 2023-07-06 15:58:03 +02:00
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ def handle_event(request: GiteaRequest):
)
# load runner commands
runner_script = load_runner_script(path=runner_script_path)
for pipeline_name, pipeline_step in runner_script.items():
for pipeline_name, pipeline_step in runner_script.pipelines.items():
print(pipeline_name)
print(pipeline_step)
+5 -2
View File
@@ -9,11 +9,14 @@ class Pipeline(BaseModel):
script: List[str]
class RunnerScript(BaseModel):
pipelines: List[Dict[str, Pipeline]]
pipelines: Dict[str, Pipeline]
if __name__ == '__main__':
path = Path(__file__).parent.parent / 'runner_script.yml'
with open(path, 'r') as fh:
script = yaml.safe_load(fh)
runner_script = RunnerScript.parse_obj(script)
print(runner_script)
print(runner_script)
for k, v in runner_script.pipelines.items():
print(k)
print(v)
+2 -2
View File
@@ -8,5 +8,5 @@ definitions:
- command2 arg1 arg2
pipelines:
- default:
<<: *step-test
default:
<<: *step-test