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 7
7
* Supported domain type. wls, jrf or restricted jrf.
8
8
*/
9
9
public 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 );
13
13
14
14
private String value ;
15
+ private WLSInstallerType installer ;
15
16
16
- DomainType (String value ) {
17
+ DomainType (String value , WLSInstallerType installer ) {
17
18
this .value = value ;
19
+ this .installer = installer ;
18
20
}
19
21
20
22
/**
@@ -30,5 +32,9 @@ public static DomainType fromValue(String value) {
30
32
}
31
33
throw new IllegalArgumentException ("argument " + value + " does not match any DomainType" );
32
34
}
35
+
36
+ public WLSInstallerType installerType () {
37
+ return installer ;
38
+ }
33
39
}
34
40
Original file line number Diff line number Diff line change @@ -177,6 +177,9 @@ private void copyResponseFilesToDir(String dirPath) throws IOException {
177
177
178
178
@ Override
179
179
public WLSInstallerType getInstallerType () {
180
+ if (installerType == null ) {
181
+ return getWdtDomainType ().installerType ();
182
+ }
180
183
return installerType ;
181
184
}
182
185
@@ -187,9 +190,9 @@ public String getInstallerVersion() {
187
190
188
191
@ Option (
189
192
names = {"--type" },
190
- description = "Installer type. Default: ${DEFAULT-VALUE} . Supported values: ${COMPLETION-CANDIDATES}"
193
+ description = "Installer type. Default: WLS . Supported values: ${COMPLETION-CANDIDATES}"
191
194
)
192
- private WLSInstallerType installerType = WLSInstallerType . WLS ;
195
+ private WLSInstallerType installerType ;
193
196
194
197
@ Option (
195
198
names = {"--version" },
Original file line number Diff line number Diff line change @@ -356,10 +356,7 @@ List<String> handleWdtArgsIfRequired(String tmpDir) throws IOException {
356
356
if (getInstallerType () != WLSInstallerType .FMW ) {
357
357
throw new IOException ("FMW installer is required for JRF domain" );
358
358
}
359
- if (runRcu ) {
360
- retVal .add (Constants .BUILD_ARG );
361
- retVal .add ("RCU_RUN_FLAG=" + "-run_rcu" );
362
- }
359
+ dockerfileOptions .setRunRcu (runRcu );
363
360
}
364
361
365
362
if (wdtArchivePath != null && Files .isRegularFile (wdtArchivePath )) {
@@ -410,6 +407,10 @@ private void addWdtUrl(String wdtKey) throws Exception {
410
407
logger .exiting ();
411
408
}
412
409
410
+ public DomainType getWdtDomainType () {
411
+ return wdtDomainType ;
412
+ }
413
+
413
414
@ Option (
414
415
names = {"--useCache" },
415
416
paramLabel = "<Cache Policy>" ,
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ public class DockerfileOptions {
42
42
private DomainType wdtDomainType ;
43
43
private String wdtJavaOptions ;
44
44
private boolean wdtModelOnly ;
45
+ private boolean wdtRunRcu ;
45
46
46
47
/**
47
48
* Options to be used with the Mustache template.
@@ -68,6 +69,7 @@ public DockerfileOptions() {
68
69
wdtModelList = new ArrayList <>();
69
70
wdtArchiveList = new ArrayList <>();
70
71
wdtVariableList = new ArrayList <>();
72
+ wdtRunRcu = false ;
71
73
}
72
74
73
75
/**
@@ -465,6 +467,15 @@ public boolean modelOnly() {
465
467
return wdtModelOnly ;
466
468
}
467
469
470
+ public boolean runRcu () {
471
+ return wdtRunRcu ;
472
+ }
473
+
474
+ public DockerfileOptions setRunRcu (boolean value ) {
475
+ wdtRunRcu = value ;
476
+ return this ;
477
+ }
478
+
468
479
public String wlsdeploy_properties () {
469
480
return wdtJavaOptions ;
470
481
}
Original file line number Diff line number Diff line change @@ -107,13 +107,11 @@ RUN unzip -q {{{tmpDir}}}/$WLS_PKG -d {{{tmpDir}}} \
107
107
LABEL WlsImageToolLayer="intermediate"
108
108
109
109
ARG WDT_PKG
110
- ARG RCU_RUN_FLAG
111
110
112
111
ENV WDT_PKG=${ WDT_PKG:-weblogic-deploy.zip} \
113
112
WLSDEPLOY_PROPERTIES="{ {wlsdeploy_properties} } -Djava.security.egd=file:/dev/./urandom" \
114
113
LC_ALL=${ DEFAULT_LOCALE:-en_US.UTF-8} \
115
114
PROPERTIES_FILE_DIR={ {{oracle_home} }}/properties \
116
- RCU_RUN_FLAG=${ RCU_RUN_FLAG:-} \
117
115
DOMAIN_HOME={ {{domain_home} }}
118
116
119
117
COPY --chown={ {userid} }:{ {groupid} } ${ WDT_PKG} { {{tmpDir} }}/
@@ -143,19 +141,18 @@ RUN unzip -q {{{tmpDir}}}/$WLS_PKG -d {{{tmpDir}}} \
143
141
USER { {userid} }
144
142
145
143
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 \
147
145
{ {^modelOnly} }
148
- RUN cd { {{wdt_home} }}/weblogic-deploy/bin \
149
146
&& ./createDomain.sh \
150
147
-oracle_home { {{oracle_home} }} \
151
148
-domain_home { {{domain_home} }} \
152
149
-domain_type { {domainType} } \
153
- $RCU_RUN_OPT \
150
+ { {#runRcu} }
151
+ -run_rcu \
152
+ { {/runRcu} }
154
153
{ {{wdtVariableFileArgument} }} { {{wdtModelFileArgument} }} { {{wdtArchiveFileArgument} }}
155
154
{ {/modelOnly} }
156
155
{ {#modelOnly} }
157
- RUN cd { {{wdt_home} }} \
158
- && cd weblogic-deploy/bin \
159
156
&& chmod u+x ./*.sh \
160
157
&& ./validateModel.sh \
161
158
-oracle_home { {{oracle_home} }} \
Original file line number Diff line number Diff line change 9
9
LABEL WlsImageToolLayer="intermediate"
10
10
11
11
ARG WDT_PKG
12
- ARG RCU_RUN_FLAG
13
12
14
13
ENV WDT_PKG=${ WDT_PKG:-weblogic-deploy.zip} \
15
14
WLSDEPLOY_PROPERTIES={ {wlsdeploy_properties} } \
16
15
LC_ALL=${ DEFAULT_LOCALE:-en_US.UTF-8} \
17
16
PROPERTIES_FILE_DIR={ {{oracle_home} }}/properties \
18
- RCU_RUN_FLAG=${ RCU_RUN_FLAG:-} \
19
17
DOMAIN_HOME={ {{domain_home} }} \
20
18
PATH=${ PATH} :{ {{java_home} }}/bin:{ {{oracle_home} }}/oracle_common/common/bin:{ {{oracle_home} }}/wlserver/common/bin:{ {{domain_home} }}/bin:{ {{oracle_home} }}
21
19
50
48
51
49
{ {^modelOnly} }
52
50
RUN cd { {{wdt_home} }} \
53
- && if [ -n "${ RCU_RUN_FLAG} " ]; then RCU_RUN_OPT="-run_rcu"; fi \
54
51
&& cd weblogic-deploy/bin \
55
52
&& chmod u+x ./*.sh \
56
53
&& ./{ {wdtCommand} } \
57
54
-oracle_home { {{oracle_home} }} \
58
55
-domain_home { {{domain_home} }} \
59
56
-domain_type { {domainType} } \
60
- $RCU_RUN_OPT \
57
+ { {#runRcu} }
58
+ -run_rcu \
59
+ { {/runRcu} }
61
60
{ {{wdtVariableFileArgument} }} { {{wdtModelFileArgument} }} { {{wdtArchiveFileArgument} }}
62
61
{ {/modelOnly} }
63
62
{ {#modelOnly} }
You can’t perform that action at this time.
0 commit comments