Package hudson.model.Queue

Examples of hudson.model.Queue.Executable


    public static class Contributer extends SubTaskContributor {
        public Collection<? extends SubTask> forProject(final AbstractProject<?, ?> p) {
            return Collections.singleton(new AbstractSubTask() {
                private final AbstractSubTask outer = this;
                public Executable createExecutable() throws IOException {
                    return new Executable() {
                        public SubTask getParent() {
                            return outer;
                        }

                        public void run() {
View Full Code Here


     * If {@linkplain #getCurrentExecutable() current executable} is {@link AbstractBuild},
     * return the workspace that this executor is using, or null if the build hasn't gotten
     * to that point yet.
     */
    public FilePath getCurrentWorkspace() {
        Executable e = executable;
        if(e==null) return null;
        if (e instanceof AbstractBuild) {
            AbstractBuild ab = (AbstractBuild) e;
            return ab.getWorkspace();
        }
View Full Code Here

        }
        return null;
    }

    private boolean isCurrent(Executor executor) {
        Executable currentExecutable = executor.getCurrentExecutable();
        return currentExecutable != null && currentExecutable instanceof DbBackedBuild && this.equals(currentExecutable);
    }
View Full Code Here

     * @return An AbstractBuild for deprecated methods to use.
     */
    private AbstractBuild getBuildForDeprecatedMethods() {
        Executor e = Executor.currentExecutor();
        if(e!=null) {
            Executable exe = e.getCurrentExecutable();
            if (exe instanceof AbstractBuild) {
                AbstractBuild b = (AbstractBuild) exe;
                if(b.getProject()==this)
                    return b;
            }
View Full Code Here

            }
        }

        // Check whether a build with this emulator config is already running on this machine
        for (Executor e : node.toComputer().getExecutors()) {
            Executable executable = e.getCurrentExecutable();
            if (executable == null) {
                continue;
            }

            String hash = getEmulatorConfigHashForTask(node, executable.getParent());
            if (desiredHash.equals(hash)) {
                return CauseOfBlockage.fromMessage(Messages._WAITING_FOR_EMULATOR());
            }
        }
View Full Code Here

    StringBuffer msg = new StringBuffer();
    msg.append("Currently building:");
    boolean currentlyJobsInProgess = false;
    for (Computer computer : Hudson.getInstance().getComputers()) {
      for (Executor executor : computer.getExecutors()) {
        Executable currentExecutable = executor.getCurrentExecutable();
        if (currentExecutable != null) {
          currentlyJobsInProgess = true;
          msg.append("\n- ");
          msg.append(computer.getDisplayName());
          msg.append("#");
          msg.append(executor.getNumber());
          msg.append(": ");
          msg.append(currentExecutable.getParent().getDisplayName());
          msg.append(" (Elapsed time: ");
          msg.append(Util.getTimeSpanString(executor.getElapsedTime()));
          msg.append(", Estimated remaining time: ");
          msg.append(executor.getEstimatedRemainingTime());
          msg.append(")");
View Full Code Here

     * If {@linkplain #getCurrentExecutable() current executable} is {@link AbstractBuild},
     * return the workspace that this executor is using, or null if the build hasn't gotten
     * to that point yet.
     */
    public FilePath getCurrentWorkspace() {
        Executable e = executable;
        if(e==null) return null;
        if (e instanceof AbstractBuild) {
            AbstractBuild ab = (AbstractBuild) e;
            return ab.getWorkspace();
        }
View Full Code Here

     * @return An AbstractBuild for deprecated methods to use.
     */
    private AbstractBuild getBuildForDeprecatedMethods() {
        Executor e = Executor.currentExecutor();
        if(e!=null) {
            Executable exe = e.getCurrentExecutable();
            if (exe instanceof AbstractBuild) {
                AbstractBuild b = (AbstractBuild) exe;
                if(b.getProject()==this)
                    return b;
            }
View Full Code Here

TOP

Related Classes of hudson.model.Queue.Executable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.