File tree Expand file tree Collapse file tree 6 files changed +38
-21
lines changed
java/com/oracle/weblogic/imagetool Expand file tree Collapse file tree 6 files changed +38
-21
lines changed Original file line number Diff line number Diff line change 77 * Supported domain type. wls, jrf or restricted jrf.
88 */
99public enum DomainType {
10- WLS ("wls" ),
11- JRF ("jrf" ),
12- RestrictedJRF ("rjrf" );
10+ WLS ("wls" , WLSInstallerType . WLS ),
11+ JRF ("jrf" , WLSInstallerType . FMW ),
12+ RestrictedJRF ("rjrf" , WLSInstallerType . FMW );
1313
1414 private String value ;
15+ private WLSInstallerType installer ;
1516
16- DomainType (String value ) {
17+ DomainType (String value , WLSInstallerType installer ) {
1718 this .value = value ;
19+ this .installer = installer ;
1820 }
1921
2022 /**
@@ -30,5 +32,9 @@ public static DomainType fromValue(String value) {
3032 }
3133 throw new IllegalArgumentException ("argument " + value + " does not match any DomainType" );
3234 }
35+
36+ public WLSInstallerType installerType () {
37+ return installer ;
38+ }
3339}
3440
Original file line number Diff line number Diff line change @@ -177,6 +177,9 @@ private void copyResponseFilesToDir(String dirPath) throws IOException {
177177
178178 @ Override
179179 public WLSInstallerType getInstallerType () {
180+ if (installerType == null ) {
181+ return getWdtDomainType ().installerType ();
182+ }
180183 return installerType ;
181184 }
182185
@@ -187,9 +190,9 @@ public String getInstallerVersion() {
187190
188191 @ Option (
189192 names = {"--type" },
190- description = "Installer type. Default: ${DEFAULT-VALUE} . Supported values: ${COMPLETION-CANDIDATES}"
193+ description = "Installer type. Default: WLS . Supported values: ${COMPLETION-CANDIDATES}"
191194 )
192- private WLSInstallerType installerType = WLSInstallerType . WLS ;
195+ private WLSInstallerType installerType ;
193196
194197 @ Option (
195198 names = {"--version" },
Original file line number Diff line number Diff line change @@ -356,10 +356,7 @@ List<String> handleWdtArgsIfRequired(String tmpDir) throws IOException {
356356 if (getInstallerType () != WLSInstallerType .FMW ) {
357357 throw new IOException ("FMW installer is required for JRF domain" );
358358 }
359- if (runRcu ) {
360- retVal .add (Constants .BUILD_ARG );
361- retVal .add ("RCU_RUN_FLAG=" + "-run_rcu" );
362- }
359+ dockerfileOptions .setRunRcu (runRcu );
363360 }
364361
365362 if (wdtArchivePath != null && Files .isRegularFile (wdtArchivePath )) {
@@ -410,6 +407,10 @@ private void addWdtUrl(String wdtKey) throws Exception {
410407 logger .exiting ();
411408 }
412409
410+ public DomainType getWdtDomainType () {
411+ return wdtDomainType ;
412+ }
413+
413414 @ Option (
414415 names = {"--useCache" },
415416 paramLabel = "<Cache Policy>" ,
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ public class DockerfileOptions {
4242 private DomainType wdtDomainType ;
4343 private String wdtJavaOptions ;
4444 private boolean wdtModelOnly ;
45+ private boolean wdtRunRcu ;
4546
4647 /**
4748 * Options to be used with the Mustache template.
@@ -68,6 +69,7 @@ public DockerfileOptions() {
6869 wdtModelList = new ArrayList <>();
6970 wdtArchiveList = new ArrayList <>();
7071 wdtVariableList = new ArrayList <>();
72+ wdtRunRcu = false ;
7173 }
7274
7375 /**
@@ -465,6 +467,15 @@ public boolean modelOnly() {
465467 return wdtModelOnly ;
466468 }
467469
470+ public boolean runRcu () {
471+ return wdtRunRcu ;
472+ }
473+
474+ public DockerfileOptions setRunRcu (boolean value ) {
475+ wdtRunRcu = value ;
476+ return this ;
477+ }
478+
468479 public String wlsdeploy_properties () {
469480 return wdtJavaOptions ;
470481 }
Original file line number Diff line number Diff line change @@ -107,13 +107,11 @@ RUN unzip -q {{{tmpDir}}}/$WLS_PKG -d {{{tmpDir}}} \
107107 LABEL WlsImageToolLayer="intermediate"
108108
109109 ARG WDT_PKG
110- ARG RCU_RUN_FLAG
111110
112111 ENV WDT_PKG=${ WDT_PKG:-weblogic-deploy.zip} \
113112 WLSDEPLOY_PROPERTIES="{ {wlsdeploy_properties} } -Djava.security.egd=file:/dev/./urandom" \
114113 LC_ALL=${ DEFAULT_LOCALE:-en_US.UTF-8} \
115114 PROPERTIES_FILE_DIR={ {{oracle_home} }}/properties \
116- RCU_RUN_FLAG=${ RCU_RUN_FLAG:-} \
117115 DOMAIN_HOME={ {{domain_home} }}
118116
119117 COPY --chown={ {userid} }:{ {groupid} } ${ WDT_PKG} { {{tmpDir} }}/
@@ -143,19 +141,18 @@ RUN unzip -q {{{tmpDir}}}/$WLS_PKG -d {{{tmpDir}}} \
143141 USER { {userid} }
144142
145143 RUN unzip -q { {{tmpDir} }}/$WDT_PKG -d { {{wdt_home} }} \
146- && if [ -n "$ { RCU_RUN_FLAG } " ]; then RCU_RUN_OPT="-run_rcu"; fi
144+ && cd { {{wdt_home } }}/weblogic-deploy/bin \
147145 { {^modelOnly} }
148- RUN cd { {{wdt_home} }}/weblogic-deploy/bin \
149146 && ./createDomain.sh \
150147 -oracle_home { {{oracle_home} }} \
151148 -domain_home { {{domain_home} }} \
152149 -domain_type { {domainType} } \
153- $RCU_RUN_OPT \
150+ { {#runRcu} }
151+ -run_rcu \
152+ { {/runRcu} }
154153 { {{wdtVariableFileArgument} }} { {{wdtModelFileArgument} }} { {{wdtArchiveFileArgument} }}
155154 { {/modelOnly} }
156155 { {#modelOnly} }
157- RUN cd { {{wdt_home} }} \
158- && cd weblogic-deploy/bin \
159156 && chmod u+x ./*.sh \
160157 && ./validateModel.sh \
161158 -oracle_home { {{oracle_home} }} \
Original file line number Diff line number Diff line change 99 LABEL WlsImageToolLayer="intermediate"
1010
1111 ARG WDT_PKG
12- ARG RCU_RUN_FLAG
1312
1413 ENV WDT_PKG=${ WDT_PKG:-weblogic-deploy.zip} \
1514 WLSDEPLOY_PROPERTIES={ {wlsdeploy_properties} } \
1615 LC_ALL=${ DEFAULT_LOCALE:-en_US.UTF-8} \
1716 PROPERTIES_FILE_DIR={ {{oracle_home} }}/properties \
18- RCU_RUN_FLAG=${ RCU_RUN_FLAG:-} \
1917 DOMAIN_HOME={ {{domain_home} }} \
2018 PATH=${ PATH} :{ {{java_home} }}/bin:{ {{oracle_home} }}/oracle_common/common/bin:{ {{oracle_home} }}/wlserver/common/bin:{ {{domain_home} }}/bin:{ {{oracle_home} }}
2119
5048
5149 { {^modelOnly} }
5250 RUN cd { {{wdt_home} }} \
53- && if [ -n "${ RCU_RUN_FLAG} " ]; then RCU_RUN_OPT="-run_rcu"; fi \
5451 && cd weblogic-deploy/bin \
5552 && chmod u+x ./*.sh \
5653 && ./{ {wdtCommand} } \
5754 -oracle_home { {{oracle_home} }} \
5855 -domain_home { {{domain_home} }} \
5956 -domain_type { {domainType} } \
60- $RCU_RUN_OPT \
57+ { {#runRcu} }
58+ -run_rcu \
59+ { {/runRcu} }
6160 { {{wdtVariableFileArgument} }} { {{wdtModelFileArgument} }} { {{wdtArchiveFileArgument} }}
6261 { {/modelOnly} }
6362 { {#modelOnly} }
You can’t perform that action at this time.
0 commit comments