diff --git a/src/main/java/sp/sd/fileoperations/FileZipOperation.java b/src/main/java/sp/sd/fileoperations/FileZipOperation.java index 2d6d1b1..1ef210e 100644 --- a/src/main/java/sp/sd/fileoperations/FileZipOperation.java +++ b/src/main/java/sp/sd/fileoperations/FileZipOperation.java @@ -17,10 +17,12 @@ public class FileZipOperation extends FileOperation implements Serializable { private final String folderPath; + private final String outputFolderPath; @DataBoundConstructor - public FileZipOperation(String folderPath) { + public FileZipOperation(String folderPath, String outputFolderPath) { this.folderPath = folderPath; + this.outputFolderPath = outputFolderPath; } public String getFolderPath() { @@ -34,7 +36,7 @@ public boolean runOperation(Run run, FilePath buildWorkspace, Launcher lau EnvVars envVars = run.getEnvironment(listener); try { FilePath ws = new FilePath(buildWorkspace, "."); - result = ws.act(new TargetFileCallable(listener, envVars.expand(folderPath), envVars)); + result = ws.act(new TargetFileCallable(listener, envVars.expand(folderPath), envVars.expand(outputFolderPath), envVars)); } catch (Exception e) { listener.fatalError(e.getMessage()); return false; @@ -50,10 +52,12 @@ private static final class TargetFileCallable implements FilePath.FileCallable + + + \ No newline at end of file