summaryrefslogtreecommitdiff
path: root/src/marlin.core/functional/WorkflowBuilder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/marlin.core/functional/WorkflowBuilder.cs')
-rw-r--r--src/marlin.core/functional/WorkflowBuilder.cs33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/marlin.core/functional/WorkflowBuilder.cs b/src/marlin.core/functional/WorkflowBuilder.cs
index 79da909..a912196 100644
--- a/src/marlin.core/functional/WorkflowBuilder.cs
+++ b/src/marlin.core/functional/WorkflowBuilder.cs
@@ -34,7 +34,6 @@ public class WorkflowBuilder
this.ApplyRequirements(file.Requirements);
this.ApplyRecipes(file.Recipes);
this.ApplySteps(file.Steps);
- this.ApplyArtifactHandlers(file.ArtifactHandlers);
}
private void ApplyRequirements(Dictionary<string, RequirementSetDto>? requirements)
@@ -95,19 +94,11 @@ public class WorkflowBuilder
ApplyAbstractStep(step, dto);
step.BaseId = dto.Base;
- step.Ingest = dto.Ingest ?? [];
if (dto.Artifacts != null)
{
- foreach (var (artifactId, artifactDto) in dto.Artifacts)
- {
- step.Artifacts[artifactId] = new Artifact(artifactId)
- {
- Path = artifactDto.Path!,
- Type = artifactDto.As!,
- Handle = artifactDto.Handle ?? ArtifactHandle.Defer
- };
- }
+ foreach (var item in dto.Artifacts)
+ step.Artifacts[item.Key] = item.Value;
}
if (dto.Cleanup != null)
@@ -123,26 +114,6 @@ public class WorkflowBuilder
return step;
}
- private void ApplyArtifactHandlers(Dictionary<string, ArtifactHandlerDto>? handlers)
- {
- if (handlers == null)
- return;
-
- foreach (var (id, dto) in handlers)
- {
- var handler = new ArtifactHandler(id);
-
- if (dto.Handle != null)
- {
- var handleStep = new ArtifactHandlerStep(id + "/handle");
- ApplyAbstractStep(handleStep, dto.Handle);
- handler.Handle = handleStep;
- }
-
- this._workflow.ArtifactHandlers[id] = handler;
- }
- }
-
private static void ApplyAbstractStep(AbstractStep step, StepDtoBase dto)
{
step.Name = dto.Name;