Class OneShotComputer

All Implemented Interfaces:
ExtensionPoint, DescriptorByNameOwner, ExecutorListener, ModelObject, SearchableModelObject, SearchItem, AccessControlled, IComputer, ModelObjectWithContextMenu, Named, HasWidgets, IconSpec, org.kohsuke.stapler.StaplerProxy
Direct Known Subclasses:
DockerComputer

public abstract class OneShotComputer extends SlaveComputer
  • Field Details

  • Constructor Details

    • OneShotComputer

      public OneShotComputer(OneShotSlave slave)
  • Method Details

    • isOffline

      public boolean isOffline()
      Claim we are online so we get task assigned to the executor, so a $Run is created, then can actually launch and report provisioning status in the build log.
      Specified by:
      isOffline in interface IComputer
      Overrides:
      isOffline in class Computer
    • isActuallyOffline

      public boolean isActuallyOffline()
    • getNode

      @NonNull public OneShotSlave getNode()
      Overrides:
      getNode in class SlaveComputer
    • removeExecutor

      protected void removeExecutor(Executor e)
      Overrides:
      removeExecutor in class Computer
    • terminate

      protected void terminate()
    • getDefaultCharset

      public Charset getDefaultCharset()
      We only do support Linux docker images, so we assume UTF-8. This let us wait for build log to be created and setup as a $BuildListener before we actually launch
      Overrides:
      getDefaultCharset in class SlaveComputer
    • setListener

      public void setListener(TaskListener listener)
    • getListener

      public TaskListener getListener()
      Overrides:
      getListener in class SlaveComputer