@@ -61,6 +61,8 @@ public class Domain {
6161 protected String userProjectsDir = "" ;
6262 private String projectRoot = "" ;
6363 private boolean ingressPerDomain = true ;
64+ private String imageTag = "12.2.1.3" ;
65+ private String imageName = "store/oracle/weblogic" ;
6466
6567 protected String generatedInputYamlFile ;
6668
@@ -671,6 +673,8 @@ public void deletePVCAndCheckPVReleased(String jobName) throws Exception {
671673 * @throws Exception
672674 */
673675 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
674678 String cmd =
675679 BaseTest .getProjectRoot ()
676680 + "/src/integration-tests/bash/krun.sh -m "
@@ -1129,13 +1133,10 @@ protected void callCreateDomainScript(String outputDir) throws Exception {
11291133 String outputStr = result .stdout ().trim ();
11301134 logger .info ("Command returned " + outputStr );
11311135
1136+ // for remote k8s cluster and domain in image case, push the domain image to OCIR
11321137 if (domainMap .containsKey ("domainHomeImageBase" ) && BaseTest .SHARED_CLUSTER ) {
11331138 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 ;
11391140 TestUtils .loginAndPushImageToOCIR (image );
11401141
11411142 // 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 {
11491150 domainNS );
11501151 }
11511152
1152- // write configOverride and configOverrideSecrets to domain.yaml
1153+ // write configOverride and configOverrideSecrets to domain.yaml and/or create domain
11531154 if (domainMap .containsKey ("configOverrides" ) || domainMap .containsKey ("domainHomeImageBase" )) {
11541155 appendToDomainYamlAndCreate ();
11551156 }
@@ -1423,13 +1424,11 @@ protected void initialize(Map<String, Object> inputDomainMap) throws Exception {
14231424 domainMap .put ("t3PublicAddress" , TestUtils .getHostName ());
14241425 }
14251426
1426- String imageName = "store/oracle/weblogic" ;
14271427 if (System .getenv ("IMAGE_NAME_WEBLOGIC" ) != null ) {
14281428 imageName = System .getenv ("IMAGE_NAME_WEBLOGIC" );
14291429 logger .info ("IMAGE_NAME_WEBLOGIC " + imageName );
14301430 }
14311431
1432- String imageTag = "12.2.1.3" ;
14331432 if (System .getenv ("IMAGE_TAG_WEBLOGIC" ) != null ) {
14341433 imageTag = System .getenv ("IMAGE_TAG_WEBLOGIC" );
14351434 logger .info ("IMAGE_TAG_WEBLOGIC " + imageTag );
@@ -1443,6 +1442,16 @@ protected void initialize(Map<String, Object> inputDomainMap) throws Exception {
14431442 } else {
14441443 domainMap .put ("imagePullSecretName" , "docker-store" );
14451444 }
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+ }
14461455 }
14471456
14481457 if (domainMap .containsKey ("domainHomeImageBuildPath" )) {
@@ -1661,7 +1670,7 @@ private String prepareCmdToCallCreateDomainScript(String outputDir) {
16611670 }
16621671 createDomainScriptCmd .append (generatedInputYamlFile );
16631672
1664- // skip executing yaml if configOverrides
1673+ // skip executing yaml if configOverrides or domain in image
16651674 if (!domainMap .containsKey ("configOverrides" )
16661675 && !domainMap .containsKey ("domainHomeImageBase" )) {
16671676 createDomainScriptCmd .append (" -e " );
0 commit comments