integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java
public static ExecResult loginAndPushImageToOcir(String image) throws Exception {
    String dockerLoginAndPushCmd =
        "docker login "
            + System.getenv("REPO_REGISTRY")
            + " -u "
            + System.getenv("REPO_USERNAME")
            + " -p \""
            + System.getenv("REPO_PASSWORD")
            + "\" && docker push "
            + image;
    String cmdForDebug =
        "docker login "
            + System.getenv("REPO_REGISTRY")
            + " -u ****** -p ******* "
            + "\" && docker push "
            + image;
    ExecResult result = TestUtils.execOrAbortProcess(dockerLoginAndPushCmd);
    LoggerHelper.getLocal().log(Level.INFO,
        "cmd "
            + cmdForDebug
            + "\n result "
            + result.stdout()
            + "\n err "
            + result.stderr());
    return result;
  }
/**
   * execute login and push image to OCIR.
   * @param image image
   * @return executor
   * @throws Exception on failure
   */
execute login and push image to OCIR.
@param image image
@return executor
@throws Exception on failure
execute login and push image to OCIR . @param image image @return executor @throws Exception on failure
public static ExecResult loginAndPushImageToOcir(String image) throws Exception {
    String dockerLoginAndPushCmd =
        "docker login "
            + System.getenv("REPO_REGISTRY")
            + " -u "
            + System.getenv("REPO_USERNAME")
            + " -p \""
            + System.getenv("REPO_PASSWORD")
            + "\" && docker push "
            + image;
    String cmdForDebug =
        "docker login "
            + System.getenv("REPO_REGISTRY")
            + " -u ****** -p ******* "
            + "\" && docker push "
            + image;
    ExecResult result = TestUtils.execOrAbortProcess(dockerLoginAndPushCmd);
    LoggerHelper.getLocal().log(Level.INFO,
        "cmd "
            + cmdForDebug
            + "\n result "
            + result.stdout()
            + "\n err "
            + result.stderr());
    return result;
  }
public static ExecResult loginAndPushImageToOcir ( String image ) throws Exception { String dockerLoginAndPushCmd = "docker login " + System . getenv ( "REPO_REGISTRY" ) + " -u " + System . getenv ( "REPO_USERNAME" ) + " -p \"" + System . getenv ( "REPO_PASSWORD" ) + "\" && docker push " + image ; String cmdForDebug = "docker login " + System . getenv ( "REPO_REGISTRY" ) + " -u ****** -p ******* " + "\" && docker push " + image ; ExecResult result = TestUtils . execOrAbortProcess ( dockerLoginAndPushCmd ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "cmd " + cmdForDebug + "\n result " + result . stdout ( ) + "\n err " + result . stderr ( ) ) ; return result ; }
execute login and push image to OCIR.
execute login and push image to OCIR .