Class AbstractBuildLog

java.lang.Object
org.springframework.boot.buildpack.platform.build.AbstractBuildLog
All Implemented Interfaces:
BuildLog

public abstract class AbstractBuildLog extends Object implements BuildLog
Base class for BuildLog implementations.
Since:
2.3.0
Author:
Phillip Webb, Scott Frederick, Andrey Shlykov, Rafael Ceccone
  • Constructor Details

    • AbstractBuildLog

      public AbstractBuildLog()
  • Method Details

    • start

      public void start(BuildRequest request)
      Description copied from interface: BuildLog
      Log that a build is starting.
      Specified by:
      start in interface BuildLog
      Parameters:
      request - the build request
    • pullingImage

      public Consumer<TotalProgressEvent> pullingImage(ImageReference imageReference, org.springframework.boot.buildpack.platform.build.ImageType imageType)
      Description copied from interface: BuildLog
      Log that an image is being pulled.
      Specified by:
      pullingImage in interface BuildLog
      Parameters:
      imageReference - the image reference
      imageType - the image type
      Returns:
      a consumer for progress update events
    • pulledImage

      public void pulledImage(Image image, org.springframework.boot.buildpack.platform.build.ImageType imageType)
      Description copied from interface: BuildLog
      Log that an image has been pulled.
      Specified by:
      pulledImage in interface BuildLog
      Parameters:
      image - the image that was pulled
      imageType - the image type that was pulled
    • pushingImage

      public Consumer<TotalProgressEvent> pushingImage(ImageReference imageReference)
      Description copied from interface: BuildLog
      Log that an image is being pushed.
      Specified by:
      pushingImage in interface BuildLog
      Parameters:
      imageReference - the image reference
      Returns:
      a consumer for progress update events
    • pushedImage

      public void pushedImage(ImageReference imageReference)
      Description copied from interface: BuildLog
      Log that an image has been pushed.
      Specified by:
      pushedImage in interface BuildLog
      Parameters:
      imageReference - the image reference
    • executingLifecycle

      public void executingLifecycle(BuildRequest request, org.springframework.boot.buildpack.platform.build.LifecycleVersion version, VolumeName buildCacheVolume)
      Description copied from interface: BuildLog
      Log that the lifecycle is executing.
      Specified by:
      executingLifecycle in interface BuildLog
      Parameters:
      request - the build request
      version - the lifecycle version
      buildCacheVolume - the name of the build cache volume in use
    • executingLifecycle

      public void executingLifecycle(BuildRequest request, org.springframework.boot.buildpack.platform.build.LifecycleVersion version, Cache buildCache)
      Description copied from interface: BuildLog
      Log that the lifecycle is executing.
      Specified by:
      executingLifecycle in interface BuildLog
      Parameters:
      request - the build request
      version - the lifecycle version
      buildCache - the build cache in use
    • runningPhase

      public Consumer<LogUpdateEvent> runningPhase(BuildRequest request, String name)
      Description copied from interface: BuildLog
      Log that a specific phase is running.
      Specified by:
      runningPhase in interface BuildLog
      Parameters:
      request - the build request
      name - the name of the phase
      Returns:
      a consumer for log updates
    • skippingPhase

      public void skippingPhase(String name, String reason)
      Description copied from interface: BuildLog
      Log that a specific phase is being skipped.
      Specified by:
      skippingPhase in interface BuildLog
      Parameters:
      name - the name of the phase
      reason - the reason the phase is skipped
    • executedLifecycle

      public void executedLifecycle(BuildRequest request)
      Description copied from interface: BuildLog
      Log that the lifecycle has executed.
      Specified by:
      executedLifecycle in interface BuildLog
      Parameters:
      request - the build request
    • taggedImage

      public void taggedImage(ImageReference tag)
      Description copied from interface: BuildLog
      Log that a tag has been created.
      Specified by:
      taggedImage in interface BuildLog
      Parameters:
      tag - the tag reference
    • failedCleaningWorkDir

      public void failedCleaningWorkDir(Cache cache, Exception exception)
      Description copied from interface: BuildLog
      Log that a cache cleanup step was not completed successfully.
      Specified by:
      failedCleaningWorkDir in interface BuildLog
      Parameters:
      cache - the cache
      exception - any exception that caused the failure
    • log

      protected void log()
    • log

      protected abstract void log(String message)
    • getProgressConsumer

      protected abstract Consumer<TotalProgressEvent> getProgressConsumer(String message)