code: public static @Nullable Computer currentComputer() {
          Executor e = Executor.currentExecutor();
          return e != null ? e.getOwner() : null;
      }
docs: Gets the current {@link Computer} that the build is running.
  This method only works when called during a build, such as by
  {@link hudson.tasks.Publisher}, {@link hudson.tasks.BuildWrapper}, etc.
  @return the {@link Computer} associated with {@link Executor#currentExecutor}, or (consistently as of 1.591) null if not on an executor thread