Skip to content

Commit

Permalink
WIP. Use a better wording
Browse files Browse the repository at this point in the history
Signed-off-by: cmoulliard <[email protected]>
  • Loading branch information
cmoulliard committed Sep 19, 2024
1 parent 8db553c commit 662d654
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/dev/snowdrop/factory/Builder.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public Builder withResourceType(String resourceType) {
return this;
}

public HasMetadata buildResource(Configurator cfg) {
public HasMetadata build(Configurator cfg) {
return provider.buildResource(cfg, resourceType);
}
}
4 changes: 2 additions & 2 deletions src/main/java/dev/snowdrop/factory/TektonResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public static HasMetadata create(Configurator cfg) {
throw new RuntimeException("Missing tekton resource type: pipelinerun taskrun, etc");
}

return ResourceFactory
return new WorkflowBuilder()
.withProvider(PROVIDER)
.withResourceType(RESOURCE_TYPE)
.buildResource(cfg);
.build(cfg);
}

public static PipelineTask createTaskWithEmbeddedScript(Action action, String runAfter, List<String> args, List<When> when, Map<String, Workspace> jobWorkspacesMap, List<TaskResult> results) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import dev.snowdrop.factory.tekton.TektonProvider;

public class ResourceFactory {
public static Builder withProvider(Type providerType) {
public class WorkflowBuilder {
public Builder withProvider(Type providerType) {
Provider provider = createProvider(providerType.toString()); // convert string to enum if needed
return new Builder(provider);
}
Expand Down

0 comments on commit 662d654

Please sign in to comment.