Skip to content

Commit 864ccd1

Browse files
committed
adding support for domain home in image cases
1 parent f541ff1 commit 864ccd1

File tree

1 file changed

+17
-3
lines changed
  • integration-tests/src/test/java/oracle/kubernetes/operator/utils

1 file changed

+17
-3
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,9 @@ private void generateInputYaml() throws Exception {
877877

878878
private void callCreateDomainScript(String outputDir) throws Exception {
879879

880-
// copy create domain py script
881-
if (domainMap.containsKey("createDomainPyScript")) {
880+
// copy create domain py script for domain on pv case
881+
if (domainMap.containsKey("createDomainPyScript")
882+
&& !domainMap.containsKey("domainHomeImageBase")) {
882883
Files.copy(
883884
new File(BaseTest.getProjectRoot() + "/" + domainMap.get("createDomainPyScript"))
884885
.toPath(),
@@ -890,9 +891,13 @@ private void callCreateDomainScript(String outputDir) throws Exception {
890891
}
891892

892893
StringBuffer createDomainScriptCmd = new StringBuffer(BaseTest.getResultDir());
894+
895+
// call different create-domain.sh based on the domain type
893896
if (domainMap.containsKey("domainHomeImageBase")) {
894-
// clone docker sample from github
897+
898+
// clone docker sample from github and copy create domain py script for domain in image case
895899
gitCloneDockerImagesSample(domainMap);
900+
896901
createDomainScriptCmd
897902
.append(
898903
"/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain.sh -u ")
@@ -1325,6 +1330,15 @@ private void gitCloneDockerImagesSample(Map domainMap) throws Exception {
13251330
+ " "
13261331
+ result.stdout());
13271332
}
1333+
1334+
// copy create domain py script to cloned location
1335+
if (domainMap.containsKey("createDomainPyScript")) {
1336+
Files.copy(
1337+
new File(BaseTest.getProjectRoot() + "/" + domainMap.get("createDomainPyScript"))
1338+
.toPath(),
1339+
new File(domainHomeImageBuildPath + "/container-scripts/create-wls-domain.py").toPath(),
1340+
StandardCopyOption.REPLACE_EXISTING);
1341+
}
13281342
}
13291343
}
13301344

0 commit comments

Comments
 (0)