integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java
protected void callCreateDomainScript(String outputDir) throws Exception {

    // call different create domain script based on the domain type
    final String createDomainScriptCmd = prepareCmdToCallCreateDomainScript(outputDir);

    // clone docker sample from github and copy create domain py script for domain in image case
    if (domainMap.containsKey("domainHomeImageBase")) {
      gitCloneDockerImagesSample();
    }

    copyDomainTemplate(domainMap);

    // copy create domain py script if domain map contains createDomainPyScript
    copyCreateDomainPy();

    // change CLUSTER_TYPE to CONFIGURED in create-domain-job-template.yaml for configured cluster
    // in domain on pv
    // as samples only support DYNAMIC cluster or copy config cluster topology for domain in image
    changeClusterTypeInCreateDomainJobTemplate();

    // Get the map of any additional environment vars, or null
    Map<String, String> additionalEnvMap = (Map<String, String>) domainMap.get("additionalEnvMap");

    LoggerHelper.getLocal().log(Level.INFO, "Running " + createDomainScriptCmd);
    ExecResult result = ExecCommand.exec(createDomainScriptCmd, true, additionalEnvMap);
    if (result.exitValue() != 0) {
      throw new RuntimeException(
          "FAILURE: command "
              + createDomainScriptCmd
              + " failed, returned "
              + result.stdout()
              + "\n"
              + result.stderr());
    }
    String outputStr = result.stdout().trim();
    LoggerHelper.getLocal().log(Level.INFO, "Command returned " + outputStr);
  
    // for remote k8s cluster and domain in image case, push the domain image to OCIR
    if (domainMap.containsKey("domainHomeImageBase") && BaseTest.SHARED_CLUSTER) {
      String image = (String)domainMap.get("image");
      TestUtils.loginAndPushImageToOcir(image);

      // create ocir registry secret in the same ns as domain which is used while pulling the domain
      // image
      
      TestUtils.createDockerRegistrySecret(
          "ocir-domain",
          System.getenv("REPO_REGISTRY"),
          System.getenv("REPO_USERNAME"),
          System.getenv("REPO_PASSWORD"),
          System.getenv("REPO_EMAIL"),
          domainNS);
    }

    //create configmap for MII
    createMiiConfigMap("miiConfigMap", "miiConfigMapFileOrDir");

    // write configOverride, shutdownOptionsOverrides and configOverrideSecrets to domain.yaml and/or create domain
    if (domainMap.containsKey("configOverrides") || domainMap.containsKey("domainHomeImageBase")
        || domainMap.containsKey("shutdownOptionsOverrides")
        || !createDomainResource) {
      appendToDomainYamlAndCreate();
    }
  }
/**
   * Copy create-domain.py if domain Map contains createDomainPyScript, git clone docker-images for
   * domain in image and call create-domain.sh script based on the domain type. Append
   * configOverrides to domain.yaml.
   *
   * @param outputDir directory for the generated Kubernetes YAML files for the domain when
   *                  create-domain.sh is called
   * @throws Exception if git clone fails or if createDomainPyScript can not be copied or if the
   *                   cluster topology file can not be copied or if create-domain.sh fails
   */
Copy create-domain.py if domain Map contains createDomainPyScript, git clone docker-images for
domain in image and call create-domain.sh script based on the domain type.

@param outputDir directory for the generated Kubernetes YAML files for the domain when
create-domain.sh is called
@throws Exception if git clone fails or if createDomainPyScript can not be copied or if the
cluster topology file can not be copied or if create-domain.sh fails
Copy create - domain . py if domain Map contains createDomainPyScript git clone docker - images for domain in image and call create - domain . sh script based on the domain type . @param outputDir directory for the generated Kubernetes YAML files for the domain when create - domain . sh is called @throws Exception if git clone fails or if createDomainPyScript can not be copied or if the cluster topology file can not be copied or if create - domain . sh fails
protected void callCreateDomainScript(String outputDir) throws Exception {
    final String createDomainScriptCmd = prepareCmdToCallCreateDomainScript(outputDir);
    if (domainMap.containsKey("domainHomeImageBase")) {
      gitCloneDockerImagesSample();
    }
    copyDomainTemplate(domainMap);
    copyCreateDomainPy();
    changeClusterTypeInCreateDomainJobTemplate();
    Map<String, String> additionalEnvMap = (Map<String, String>) domainMap.get("additionalEnvMap");
    LoggerHelper.getLocal().log(Level.INFO, "Running " + createDomainScriptCmd);
    ExecResult result = ExecCommand.exec(createDomainScriptCmd, true, additionalEnvMap);
    if (result.exitValue() != 0) {
      throw new RuntimeException(
          "FAILURE: command "
              + createDomainScriptCmd
              + " failed, returned "
              + result.stdout()
              + "\n"
              + result.stderr());
    }
    String outputStr = result.stdout().trim();
    LoggerHelper.getLocal().log(Level.INFO, "Command returned " + outputStr);
    if (domainMap.containsKey("domainHomeImageBase") && BaseTest.SHARED_CLUSTER) {
      String image = (String)domainMap.get("image");
      TestUtils.loginAndPushImageToOcir(image);
      TestUtils.createDockerRegistrySecret(
          "ocir-domain",
          System.getenv("REPO_REGISTRY"),
          System.getenv("REPO_USERNAME"),
          System.getenv("REPO_PASSWORD"),
          System.getenv("REPO_EMAIL"),
          domainNS);
    }
    createMiiConfigMap("miiConfigMap", "miiConfigMapFileOrDir");
    if (domainMap.containsKey("configOverrides") || domainMap.containsKey("domainHomeImageBase")
        || domainMap.containsKey("shutdownOptionsOverrides")
        || !createDomainResource) {
      appendToDomainYamlAndCreate();
    }
  }
protected void callCreateDomainScript ( String outputDir ) throws Exception { final String createDomainScriptCmd = prepareCmdToCallCreateDomainScript ( outputDir ) ; if ( domainMap . containsKey ( "domainHomeImageBase" ) ) { gitCloneDockerImagesSample ( ) ; } copyDomainTemplate ( domainMap ) ; copyCreateDomainPy ( ) ; changeClusterTypeInCreateDomainJobTemplate ( ) ; Map < String , String > additionalEnvMap = ( Map < String , String > ) domainMap . get ( "additionalEnvMap" ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Running " + createDomainScriptCmd ) ; ExecResult result = ExecCommand . exec ( createDomainScriptCmd , true , additionalEnvMap ) ; if ( result . exitValue ( ) != 0 ) { throw new RuntimeException ( "FAILURE: command " + createDomainScriptCmd + " failed, returned " + result . stdout ( ) + "\n" + result . stderr ( ) ) ; } String outputStr = result . stdout ( ) . trim ( ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Command returned " + outputStr ) ; if ( domainMap . containsKey ( "domainHomeImageBase" ) && BaseTest . SHARED_CLUSTER ) { String image = ( String ) domainMap . get ( "image" ) ; TestUtils . loginAndPushImageToOcir ( image ) ; TestUtils . createDockerRegistrySecret ( "ocir-domain" , System . getenv ( "REPO_REGISTRY" ) , System . getenv ( "REPO_USERNAME" ) , System . getenv ( "REPO_PASSWORD" ) , System . getenv ( "REPO_EMAIL" ) , domainNS ) ; } createMiiConfigMap ( "miiConfigMap" , "miiConfigMapFileOrDir" ) ; if ( domainMap . containsKey ( "configOverrides" ) || domainMap . containsKey ( "domainHomeImageBase" ) || domainMap . containsKey ( "shutdownOptionsOverrides" ) || ! createDomainResource ) { appendToDomainYamlAndCreate ( ) ; } }
Copy create-domain.py if domain Map contains createDomainPyScript, git clone docker-images for
 domain in image and call create-domain.sh script based on the domain type.
Copy create - domain . py if domain Map contains createDomainPyScript git clone docker - images for domain in image and call create - domain . sh script based on the domain type .
// call different create domain script based on the domain type // clone docker sample from github and copy create domain py script for domain in image case // copy create domain py script if domain map contains createDomainPyScript // change CLUSTER_TYPE to CONFIGURED in create-domain-job-template.yaml for configured cluster // in domain on pv // as samples only support DYNAMIC cluster or copy config cluster topology for domain in image // Get the map of any additional environment vars, or null // for remote k8s cluster and domain in image case, push the domain image to OCIR // create ocir registry secret in the same ns as domain which is used while pulling the domain // image //create configmap for MII // write configOverride, shutdownOptionsOverrides and configOverrideSecrets to domain.yaml and/or create domain