@Override
  public ManifestTemplate call() throws IOException {
    Preconditions.checkState(!builtImages.isEmpty(), "no images given");
    EventHandlers eventHandlers = buildContext.getEventHandlers();
    try (TimerEventDispatcher ignored = new TimerEventDispatcher(eventHandlers, DESCRIPTION);
        ProgressEventDispatcher ignored2 =
            progressEventDispatcherFactory.create(
                "building a manifest list or a single manifest", 1)) {

      if (builtImages.size() == 1) {
        eventHandlers.dispatch(LogEvent.info("Building a single manifest"));
        ImageToJsonTranslator imageTranslator = new ImageToJsonTranslator(builtImages.get(0));
        BlobDescriptor configDescriptor =
            Digests.computeDigest(imageTranslator.getContainerConfiguration());
        return imageTranslator.getManifestTemplate(
            buildContext.getTargetFormat(), configDescriptor);
      }

      eventHandlers.dispatch(LogEvent.info("Building a manifest list"));
      return new ManifestListGenerator(builtImages)
          .getManifestListTemplate(buildContext.getTargetFormat());
    }
  }
Builds a manifest list or a single manifest.
jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/BuildManifestListOrSingleManifestStep.java