Package hudson.model

Examples of hudson.model.Result


        assertEquals(childProject1.getTouchStoneResultCondition(), childResultCondition);
    }

    @Test
    public void testGetTouchStoneResultConditionParentValue() throws IOException {
        Result parentResultCondition = Result.SUCCESS;
        MatrixProject parentProject = new MatrixProjectMock("parent");
        parentProject.setTouchStoneResultCondition(parentResultCondition);

        MatrixProject childProject1 = new MatrixProjectMock("child1");
        childProject1.setCascadingProject(parentProject);
View Full Code Here


        assertEquals(childProject1.getTouchStoneResultCondition(), parentResultCondition);
    }

    @Test
    public void testSetTouchStoneResultConditionDifferentValues() throws IOException {
        Result parentResultCondition = Result.SUCCESS;
        Result childResultCondition = Result.FAILURE;
        MatrixProject parentProject = new MatrixProjectMock("parent");
        parentProject.setTouchStoneResultCondition(parentResultCondition);

        MatrixProject childProject1 = new MatrixProjectMock("child1");
        childProject1.setCascadingProject(parentProject);
View Full Code Here

        assertEquals(childProject1.getTouchStoneResultCondition(), childResultCondition);
    }

    @Test
    public void testSetTouchStoneResultConditionTheSameValues() throws IOException {
        Result parentResultCondition = Result.SUCCESS;
        MatrixProject parentProject = new MatrixProjectMock("parent");
        parentProject.setTouchStoneResultCondition(parentResultCondition);

        MatrixProject childProject1 = new MatrixProjectMock("child1");
        childProject1.setCascadingProject(parentProject);
View Full Code Here

        assertEquals(childProject1.getTouchStoneResultCondition(), parentResultCondition);
    }

    @Test
    public void testSetTouchStoneResultConditionParentNull() throws IOException {
        Result childResultCondition = Result.FAILURE;

        MatrixProject childProject1 = new MatrixProjectMock("child1");
        childProject1.setTouchStoneResultCondition(childResultCondition);
        assertEquals(childProject1.getTouchStoneResultCondition(), childResultCondition);
    }
View Full Code Here

        if (build.getResult() == Result.UNSTABLE) {
            if (!dontNotifyEveryUnstableBuild)
                return new UnstableBuildMail(getRecipients(), sendToIndividuals, upstreamProjects, getCharset()).
                    getMail(build, listener);
            Result prev = findPreviousBuildResult(build);
            if (prev == Result.SUCCESS)
                return new UnstableBuildMail(getRecipients(), sendToIndividuals, upstreamProjects, getCharset()).
                    getMail(build, listener);
        }

        if (build.getResult() == Result.SUCCESS) {
            Result prev = findPreviousBuildResult(build);
            if (prev == Result.FAILURE)
                return new BackToNormalBuildMail(getRecipients(), sendToIndividuals, upstreamProjects, getCharset(),
                    Messages.MailSender_BackToNormal_Normal()).getMail(build, listener);
            if (prev == Result.UNSTABLE)
                return new BackToNormalBuildMail(getRecipients(), sendToIndividuals, upstreamProjects, getCharset(),
View Full Code Here

    @Override
    public boolean prebuild(AbstractBuild<?, ?> build, BuildListener listener) {
        if(latestOnly) {
            AbstractBuild<?,?> b = build.getProject().getLastCompletedBuild();
            Result bestResultSoFar = Result.NOT_BUILT;
            while(b!=null) {
                if (b.getResult().isBetterThan(bestResultSoFar)) {
                    bestResultSoFar = b.getResult();
                } else {
                    // remove old artifacts
View Full Code Here

                    for (MatrixConfiguration c : touchStoneConfigurations) {
                        scheduleConfigurationBuild(logger, c);
                    }
                }

                Result r = Result.SUCCESS;
                for (MatrixConfiguration c : touchStoneConfigurations) {
                    if (p.isRunSequentially()) {
                        scheduleConfigurationBuild(logger, c);
                    }
                    Result buildResult = waitForCompletion(listener, c);
                    r = r.combine(buildResult);
                }

                if (p.getTouchStoneResultCondition() != null && r.isWorseThan(p.getTouchStoneResultCondition())) {
                    logger.printf("Touchstone configurations resulted in %s, so aborting...\n", r);
                    return r;
                }

                if (!p.isRunSequentially()) {
                    for (MatrixConfiguration c : delayedConfigurations) {
                        scheduleConfigurationBuild(logger, c);
                    }
                }

                for (MatrixConfiguration c : delayedConfigurations) {
                    if (p.isRunSequentially()) {
                        scheduleConfigurationBuild(logger, c);
                    }
                    Result buildResult = waitForCompletion(listener, c);
                    r = r.combine(buildResult);
                }

                return r;
            } catch (InterruptedException e) {
View Full Code Here

            while (true) {
                MatrixRun b = c.getBuildByNumber(getNumber());

                // two ways to get beyond this. one is that the build starts and gets done,
                // or the build gets cancelled before it even started.
                Result buildResult = null;
                if (b != null && !b.isBuilding()) {
                    buildResult = b.getResult();
                }
                Queue.Item qi = c.getQueueItem();
                if (b == null && qi == null) {
View Full Code Here

            ObjectId parentSha1 = getFirstParent(sha1, git);
            Revision parentRev = new Revision(parentSha1);
            parentRev.getBranches().add(new Branch(singleBranch, parentSha1));

            int prevBuildNum = 0;
            Result r = null;

            Build lastBuild = data.getLastBuildOfBranch(singleBranch);
            if (lastBuild != null) {
                prevBuildNum = lastBuild.getBuildNumber();
                r = lastBuild.getBuildResult();
View Full Code Here

      *
      * @param memoryImprint the memoryimprint.
      * @param command the command.
      */
     public static void fireOnCompleted(MemoryImprint memoryImprint, String command) {
         Result result = Result.FAILURE;
         if (memoryImprint.wereAllBuildsSuccessful()) {
             result = Result.SUCCESS;
         } else if (memoryImprint.wereAnyBuildsFailed()) {
             result = Result.FAILURE;
         } else if (memoryImprint.wereAnyBuildsUnstable()) {
View Full Code Here

TOP

Related Classes of hudson.model.Result

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.