private static Consumer<ProgressEventHandler.Update> logUpdate() {
        return update -> {
            final List<String> progressDisplay =
                    generateProgressDisplay(update.getProgress(), update.getUnfinishedLeafTasks());
            if (progressDisplay.size() > 2 && progressDisplay.stream().allMatch(Objects::nonNull)) {
                final String progressBar = progressDisplay.get(1);
                final String task = progressDisplay.get(2);
                System.out.println(ansi().cursorUpLine(1).eraseLine().a(JIB_LOG_PREFIX).a(progressBar).a(" ").a(task));
            }
        };
    }
Push Image to registry using JIB

@param imageConfiguration ImageConfiguration
@param pushCredentials    push credentials
@param tarArchive         tar archive built during build goal
@param log                Logger
src/main/java/io/fabric8/maven/docker/util/JibServiceUtil.java