Skip to content

Commit ec9f248

Browse files
authored
Prevent RunRCU when not in CREATE (#143)
* WDT run RCU cannot be used with updateDomain
1 parent 57dd8a9 commit ec9f248

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ public CommandResponse call() throws Exception {
139139
// build wdt args if user passes --wdtModelPath
140140
wdtOptions.handleWdtArgs(dockerfileOptions, cmdBuilder, tmpDir);
141141
dockerfileOptions.setWdtCommand(wdtOperation);
142+
if (dockerfileOptions.runRcu()
143+
&& (wdtOperation == WdtOperation.UPDATE || wdtOperation == WdtOperation.DEPLOY)) {
144+
return new CommandResponse(-1, "IMG-0055");
145+
}
142146

143147
// resolve required patches
144148
handlePatchFiles(lsinventoryText);

imagetool/src/main/resources/ImageTool.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,4 @@ IMG-0051=Deleted entry {0}={1}
5353
IMG-0052=Nothing to delete for key: {0}
5454
IMG-0053=Build successful. Build time={0}s. Image tag={1}
5555
IMG-0054=Dry run complete. No image created.
56+
IMG-0055=RunRCU can only be used when creating a new domain. Please try --wdtOperation=CREATE or removing --wdtRunRCU.

0 commit comments

Comments
 (0)