Skip to content

Commit 0a13549

Browse files
authored
correct regression with WDT variable file argument in docker build (#67)
1 parent 4e48945 commit 0a13549

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

imagetool/src/main/java/com/oracle/weblogic/imagetool/cli/menu/ImageOperation.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import java.nio.file.Path;
1111
import java.nio.file.Paths;
1212
import java.util.ArrayList;
13+
import java.util.Arrays;
14+
import java.util.Collections;
1315
import java.util.LinkedList;
1416
import java.util.List;
1517
import java.util.Properties;
@@ -351,9 +353,7 @@ protected List<String> handleWdtArgsIfRequired(String tmpDir) throws IOException
351353
String wdtArchiveFilename = wdtArchivePath.getFileName().toString();
352354
Files.copy(wdtArchivePath, Paths.get(tmpDir, wdtArchiveFilename));
353355
//Until WDT supports multiple archives, take single file argument from CLI and convert to list
354-
List<String> archives = new ArrayList<>();
355-
archives.add(wdtArchiveFilename);
356-
dockerfileOptions.setWdtArchives(archives);
356+
dockerfileOptions.setWdtArchives(Collections.singletonList(wdtArchiveFilename));
357357
}
358358
dockerfileOptions.setDomainHome(wdtDomainHome);
359359

@@ -362,9 +362,8 @@ protected List<String> handleWdtArgsIfRequired(String tmpDir) throws IOException
362362
if (wdtVariablesPath != null && Files.isRegularFile(wdtVariablesPath)) {
363363
String wdtVariableFilename = wdtVariablesPath.getFileName().toString();
364364
Files.copy(wdtVariablesPath, Paths.get(tmpDir, wdtVariableFilename));
365-
retVal.add(Constants.BUILD_ARG);
366-
retVal.add("WDT_VARIABLE=" + wdtVariableFilename);
367-
retVal.addAll(getWdtRequiredBuildArgs(wdtVariablesPath));
365+
//Until WDT supports multiple variable files, take single file argument from CLI and convert to list
366+
dockerfileOptions.setWdtVariables(Collections.singletonList(wdtVariableFilename));
368367
}
369368
}
370369
logger.exiting();

0 commit comments

Comments
 (0)