Package hudson.model

Examples of hudson.model.Run


        public Map<String,String> getRecords() {
            return record;
        }

        public void onLoad() {
            Run pb = build.getPreviousBuild();
            if (pb!=null) {
                FingerprintAction a = pb.getAction(FingerprintAction.class);
                if (a!=null)
                    compact(a);
            }
        }
View Full Code Here


        return Messages.SetBuildResultCommand_ShortDescription();
    }

    @Override
    protected int run() throws Exception {
        Run r = getCurrentlyBuilding();
        r.getParent().checkPermission(Item.BUILD);
        r.setResult(result);
        return 0;
    }
View Full Code Here

   
    @Argument(metaVar="DESCRIPTION",required=true,usage="Description to be set. '=' to read from stdin.", index=2)
    public String description;

    protected int run() throws Exception {
      Run run = job.getBuildByNumber(number);
        run.checkPermission(Run.UPDATE);

        if ("=".equals(description)) {
          description = IOUtils.toString(stdin);
        }
       
        run.setDescription(description);
       
        return 0;
    }
View Full Code Here

    @Argument(metaVar="DISPLAYNAME", required=true, usage="DisplayName to be set. '-' to read from stdin.", index=2)
    public String displayName;

    protected int run() throws Exception {
        Run run = job.getBuildByNumber(number);
        run.checkPermission(Run.UPDATE);

        if ("-".equals(displayName)) {
            displayName = IOUtils.toString(stdin);
        }

        run.setDisplayName(displayName);

        return 0;
    }
View Full Code Here

    /**
     * Performs an installation.
     */
    private int install(ToolInstallation t, BuildIDs id, AbstractProject p) throws IOException, InterruptedException {

        Run b = p.getBuildByNumber(Integer.parseInt(id.number));
        if (b==null)
            throw new AbortException("No such build: "+id.number);

        Executor exec = b.getExecutor();
        if (exec==null)
            throw new AbortException(b.getFullDisplayName()+" is not building");

        Node node = exec.getOwner().getNode();

        t = t.translate(node, EnvVars.getRemote(checkChannel()), new StreamTaskListener(stderr));
        stdout.println(t.getHome());
View Full Code Here

    public PostBuildNotifier(String name) {
        this.name = name;
    }

    protected boolean didBranchRecover(DynamicBuild build, BuildListener listener) {
        Run r = build.getPreviousFinishedBuildOfSameBranch(listener);
        return r != null && r.getResult().equals(Result.FAILURE);
    }
View Full Code Here

        //      we should find a table

        //      Inside that table, there should be the following rows:
        //           org.jvnet.hudson.examples.small   0ms   0 -1 0   3
        //          org.jvnet.hudson.examples.small.deep   4ms 0 0 0  1
        Run theRun = proj.getBuildByNumber(7);
        assertTestResultsAsExpected(wc, theRun, "/testReport",
                "org.jvnet.hudson.examples.small", "0 ms", "SUCCESS",
                /* total tests expected, diff */ 3, 0,
                /* fail count expected, diff */ 0, -1,
                /* skip count expected, diff */ 0, 0);
View Full Code Here

        }
        assertNotNull("We should have a project named " + TEST_PROJECT_WITH_HISTORY, proj);

        // Validate that there are test results where I expect them to be:
        HudsonTestCase.WebClient wc = new HudsonTestCase.WebClient();
        Run theRun = proj.getBuildByNumber(4);
        assertTestResultsAsExpected(wc, theRun, "/testReport",
                        "org.jvnet.hudson.examples.small", "12 ms", "FAILURE",
                        /* total tests expected, diff */ 3, 0,
                        /* fail count expected, diff */ 1, 0,
                        /* skip count expected, diff */ 0, 0);
View Full Code Here

        diskUsage.put("notLoaded", notLoaded);
        return diskUsage;
    }
   
    public BuildDiskUsageAction getLastBuildAction() {
        Run run = project.getLastBuild();
        if (run != null) {
            return run.getAction(BuildDiskUsageAction.class);
        }

        return null;
    }
View Full Code Here

        } else if (job != null && !job.isEmpty()) {
            TopLevelItem item = Hudson.getInstance().getItem(job);
            if (item != null && item instanceof AbstractProject) {
                AbstractProject project = (AbstractProject)item;
                if (build != null && build >= 0) {
                    Run buildByNumber = project.getBuildByNumber(build);
                    if (buildByNumber != null) {
                        MetadataBuildAction action = buildByNumber.getAction(MetadataBuildAction.class);
                        if (action != null) {
                            container = action;
                        } else if (createContainer) {
                            action = new MetadataBuildAction();
                            buildByNumber.addAction(action);
                            container = action;
                        } else {
                            throw new NoMetadataException("Build #" + build + " of job "
                                    + job + " has no associated metadata.");
                        }
View Full Code Here

TOP

Related Classes of hudson.model.Run

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.