Skip to content

Commit df62831

Browse files
authored
fixed issue preventing update image when doing wdtModelOnly (#184)
1 parent 79f8546 commit df62831

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public CommandResponse call() throws Exception {
6767
}
6868
dockerfileOptions.setOracleHome(oracleHome);
6969

70-
if (wdtOptions.isUsingWdt()) {
70+
if (wdtOptions.isUsingWdt() && !wdtOptions.modelOnly()) {
7171
String domainHome = baseImageProperties.getProperty("DOMAIN_HOME", null);
7272
if (domainHome == null && wdtOperation == WdtOperation.UPDATE) {
7373
return new CommandResponse(-1, "IMG-0071", fromImage);

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ boolean isUsingWdt() {
3535
return wdtModelPath != null || wdtArchivePath != null;
3636
}
3737

38+
/**
39+
* Return true if the user specified the wdtModelOnly option, and
40+
* WDT should not run a create or update script.
41+
* @return true if the WDT script should not run during the build.
42+
*/
43+
boolean modelOnly() {
44+
return wdtModelOnly;
45+
}
46+
3847
/**
3948
* Checks whether the user requested a domain to be created with WDT.
4049
* If so, creates required file links to pass the model, archive, variables file to build process.

0 commit comments

Comments
 (0)