Skip to content

Commit

Permalink
refactor(tasks): relocate BashService to PluginService
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Aug 17, 2023
1 parent 4dc1a15 commit 8f5fdb3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.10.1-SNAPSHOT
kestraVersion=0.10.+
version=0.11.0-SNAPSHOT
kestraVersion=0.11.+
micronautVersion=3.9.3
lombokVersion=1.18.28
9 changes: 4 additions & 5 deletions src/main/java/io/kestra/plugin/kubernetes/AbstractPod.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import io.kestra.core.exceptions.IllegalVariableEvaluationException;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.runners.RunContext;
import io.kestra.core.tasks.scripts.BashService;
import io.kestra.core.tasks.PluginUtilsService;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;
Expand All @@ -15,7 +15,6 @@
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
Expand Down Expand Up @@ -131,7 +130,7 @@ protected void handleFiles(RunContext runContext, ObjectMeta metadata, PodSpec s
.build();

if (this.outputFiles != null) {
generatedOutputFiles = BashService.createOutputFiles(
generatedOutputFiles = PluginUtilsService.createOutputFiles(
tempDir(runContext),
this.outputFiles,
additionalVars
Expand All @@ -143,9 +142,9 @@ protected void handleFiles(RunContext runContext, ObjectMeta metadata, PodSpec s
}

if (this.inputFiles != null) {
Map<String, String> finalInputFiles = BashService.transformInputFiles(runContext, this.inputFiles);
Map<String, String> finalInputFiles = PluginUtilsService.transformInputFiles(runContext, this.inputFiles);

BashService.createInputFiles(
PluginUtilsService.createInputFiles(
runContext,
tempDir(runContext),
finalInputFiles,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.kestra.plugin.kubernetes.services;

import io.kestra.core.runners.RunContext;
import io.kestra.core.tasks.scripts.BashService;
import io.kestra.core.tasks.PluginUtilsService;
import lombok.Getter;
import org.slf4j.Logger;
import org.slf4j.event.Level;
Expand All @@ -12,7 +12,6 @@
import java.time.format.DateTimeParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

Expand Down Expand Up @@ -63,7 +62,7 @@ private void send() {
line = String.join(" ", logs);
}

outputs.putAll(BashService.parseOut(line, logger, runContext));
outputs.putAll(PluginUtilsService.parseOut(line, logger, runContext));


switch (level) {
Expand Down

0 comments on commit 8f5fdb3

Please sign in to comment.