@@ -61,6 +61,8 @@ public class Domain {
61
61
protected String userProjectsDir = "" ;
62
62
private String projectRoot = "" ;
63
63
private boolean ingressPerDomain = true ;
64
+ private String imageTag = "12.2.1.3" ;
65
+ private String imageName = "store/oracle/weblogic" ;
64
66
65
67
protected String generatedInputYamlFile ;
66
68
@@ -671,6 +673,8 @@ public void deletePVCAndCheckPVReleased(String jobName) throws Exception {
671
673
* @throws Exception
672
674
*/
673
675
public void createDomainOnExistingDirectory () throws Exception {
676
+
677
+ // use krun.sh so that the dir check can work on shared cluster/remote k8s cluster env as well
674
678
String cmd =
675
679
BaseTest .getProjectRoot ()
676
680
+ "/src/integration-tests/bash/krun.sh -m "
@@ -1129,13 +1133,10 @@ protected void callCreateDomainScript(String outputDir) throws Exception {
1129
1133
String outputStr = result .stdout ().trim ();
1130
1134
logger .info ("Command returned " + outputStr );
1131
1135
1136
+ // for remote k8s cluster and domain in image case, push the domain image to OCIR
1132
1137
if (domainMap .containsKey ("domainHomeImageBase" ) && BaseTest .SHARED_CLUSTER ) {
1133
1138
String image =
1134
- System .getenv ("REPO_REGISTRY" )
1135
- + "/weblogick8s/domain-home-in-image:"
1136
- + (System .getenv ("IMAGE_TAG_WEBLOGIC" ) != null
1137
- ? System .getenv ("IMAGE_TAG_WEBLOGIC" )
1138
- : "12.2.1.3" );
1139
+ System .getenv ("REPO_REGISTRY" ) + "/weblogick8s/domain-home-in-image:" + imageTag ;
1139
1140
TestUtils .loginAndPushImageToOCIR (image );
1140
1141
1141
1142
// create ocir registry secret in the same ns as domain which is used while pulling the domain
@@ -1149,7 +1150,7 @@ protected void callCreateDomainScript(String outputDir) throws Exception {
1149
1150
domainNS );
1150
1151
}
1151
1152
1152
- // write configOverride and configOverrideSecrets to domain.yaml
1153
+ // write configOverride and configOverrideSecrets to domain.yaml and/or create domain
1153
1154
if (domainMap .containsKey ("configOverrides" ) || domainMap .containsKey ("domainHomeImageBase" )) {
1154
1155
appendToDomainYamlAndCreate ();
1155
1156
}
@@ -1423,13 +1424,11 @@ protected void initialize(Map<String, Object> inputDomainMap) throws Exception {
1423
1424
domainMap .put ("t3PublicAddress" , TestUtils .getHostName ());
1424
1425
}
1425
1426
1426
- String imageName = "store/oracle/weblogic" ;
1427
1427
if (System .getenv ("IMAGE_NAME_WEBLOGIC" ) != null ) {
1428
1428
imageName = System .getenv ("IMAGE_NAME_WEBLOGIC" );
1429
1429
logger .info ("IMAGE_NAME_WEBLOGIC " + imageName );
1430
1430
}
1431
1431
1432
- String imageTag = "12.2.1.3" ;
1433
1432
if (System .getenv ("IMAGE_TAG_WEBLOGIC" ) != null ) {
1434
1433
imageTag = System .getenv ("IMAGE_TAG_WEBLOGIC" );
1435
1434
logger .info ("IMAGE_TAG_WEBLOGIC " + imageTag );
@@ -1443,6 +1442,16 @@ protected void initialize(Map<String, Object> inputDomainMap) throws Exception {
1443
1442
} else {
1444
1443
domainMap .put ("imagePullSecretName" , "docker-store" );
1445
1444
}
1445
+ } else {
1446
+ // use default image attibute value for JENKINS and standalone runs and for SHARED_CLUSTER use
1447
+ // below
1448
+ if (BaseTest .SHARED_CLUSTER ) {
1449
+ domainMap .put (
1450
+ "image" ,
1451
+ System .getenv ("REPO_REGISTRY" ) + "/weblogick8s/domain-home-in-image:" + imageTag );
1452
+ domainMap .put ("imagePullSecretName" , "ocir-domain" );
1453
+ domainMap .put ("imagePullPolicy" , "Always" );
1454
+ }
1446
1455
}
1447
1456
1448
1457
if (domainMap .containsKey ("domainHomeImageBuildPath" )) {
@@ -1661,7 +1670,7 @@ private String prepareCmdToCallCreateDomainScript(String outputDir) {
1661
1670
}
1662
1671
createDomainScriptCmd .append (generatedInputYamlFile );
1663
1672
1664
- // skip executing yaml if configOverrides
1673
+ // skip executing yaml if configOverrides or domain in image
1665
1674
if (!domainMap .containsKey ("configOverrides" )
1666
1675
&& !domainMap .containsKey ("domainHomeImageBase" )) {
1667
1676
createDomainScriptCmd .append (" -e " );
0 commit comments