Examples of scheduleBuild2()


Examples of com.groupon.jenkins.dynamic.build.DynamicProject.scheduleBuild2()

        GHRepository ghRepository = setupMockGHRepository();

        DynamicProjectRepository repo = new DynamicProjectRepository();
        DynamicProject project = repo.createNewProject(ghRepository);

        project.scheduleBuild2(0).get();

        assert(repo.getDatastore().getCount(DbBackedBuild.class) > 0);

        for(DbBackedBuild build : new DynamicBuildRepository().getBuilds(project)) {
            assertNotNull(build.getParent());
View Full Code Here

Examples of hudson.matrix.MatrixProject.scheduleBuild2()

        m.setAxes(new AxisList(new TextAxis("DoesntMatter", "aaa","bbb")));

        List<Future<MatrixBuild>> r = new ArrayList<Future<MatrixBuild>>();

        for (int i=0; i<3; i++)
            r.add(m.scheduleBuild2(0,new UserIdCause(),new ParametersAction(new StringParameterValue("FOO","value"+i))));

        for (Future<MatrixBuild> f : r)
            assertBuildStatusSuccess(f);
    }
}
View Full Code Here

Examples of hudson.maven.MavenModuleSet.scheduleBuild2()

        configureDefaultMaven();
        MavenModuleSet m = createMavenProject();
        m.setScm(new ExtractResourceSCM(getClass().getResource("../maven-surefire-unstable.zip")));
        m.setGoals("install");

        MavenModuleSetBuild b = m.scheduleBuild2(0).get();
        assertBuildStatus(Result.UNSTABLE, b);


        MavenBuild mb = b.getModuleLastBuilds().values().iterator().next();
        boolean foundFactory=false,foundSurefire=false;
View Full Code Here

Examples of hudson.maven.MavenModuleSet.scheduleBuild2()

        configureDefaultMaven();
        MavenModuleSet mms = createMavenProject();
        mms.setGoals("test");
        mms.setScm(new ExtractResourceSCM(getClass().getResource("/hudson/maven/maven-multimodule-unit-failure.zip")));
        assertBuildStatus(Result.UNSTABLE, mms.scheduleBuild2(0).get());

        MavenMailer m = new MavenMailer();
        m.recipients = recipient;
        m.perModuleEmail = perModuleEamil;
        mms.getReporters().add(m);
View Full Code Here

Examples of hudson.maven.MavenModuleSet.scheduleBuild2()

        MavenMailer m = new MavenMailer();
        m.recipients = recipient;
        m.perModuleEmail = perModuleEamil;
        mms.getReporters().add(m);

        mms.scheduleBuild2(0).get();

        Address[] senders = yourInbox.get(0).getFrom();
        assertEquals(1, senders.length);
        assertEquals("me <me@sun.com>", senders[0].toString());
View Full Code Here

Examples of hudson.maven.MavenModuleSet.scheduleBuild2()

            // Configure for UNSTABLE
            m.setGoals("clean test");
            m.setScm(new ExtractResourceSCM(getClass().getResource("maven-test-failure.zip")));
        } // otherwise do nothing which gets FAILURE
        // First build should not trigger downstream project
        MavenModuleSetBuild b = m.scheduleBuild2(0).get();
        assertNoDownstreamBuild(dp, b);

        if (evenWhenUnstable) {
            // Configure for UNSTABLE
            m.setGoals("clean test");
View Full Code Here

Examples of hudson.maven.MavenModuleSet.scheduleBuild2()

            // Configure for SUCCESS
            m.setGoals("clean");
            m.setScm(new ExtractResourceSCM(getClass().getResource("maven-empty.zip")));
        }
        // Next build should trigger downstream project
        b = m.scheduleBuild2(0).get();
        assertDownstreamBuild(dp, b);
    }

    public void testMavenBuildTrigger() throws Exception {
        doMavenTriggerTest(false);
View Full Code Here

Examples of hudson.maven.MavenModuleSet.scheduleBuild2()

        project.setJDK(hudson.getJDK("default"));

        project.setMaven("maven");
        project.setGoals("clean");

        Run build = project.scheduleBuild2(0).get();
        assertBuildStatus(Result.FAILURE, build);

        ToolLocationNodeProperty property = new ToolLocationNodeProperty(
                new ToolLocationNodeProperty.ToolLocation(hudson.getDescriptorByType(MavenInstallation.DescriptorImpl.class), "maven", mavenPath));
        slave.getNodeProperties().add(property);
View Full Code Here

Examples of hudson.maven.MavenModuleSet.scheduleBuild2()

        ToolLocationNodeProperty property = new ToolLocationNodeProperty(
                new ToolLocationNodeProperty.ToolLocation(hudson.getDescriptorByType(MavenInstallation.DescriptorImpl.class), "maven", mavenPath));
        slave.getNodeProperties().add(property);

        build = project.scheduleBuild2(0).get();
        System.out.println(build.getLog());
        assertBuildStatus(Result.SUCCESS, build);

    }
View Full Code Here

Examples of hudson.maven.MavenModuleSet.scheduleBuild2()

  configureDefaultMaven();
  MavenModuleSet m = createMavenProject("maven-render-test");
  m.setScm(new ExtractResourceSCM(m.getClass().getResource("maven-test-failure-findbugs.zip")));
  m.setGoals("clean test");

  MavenModuleSetBuild b = assertBuildStatus(Result.UNSTABLE, m.scheduleBuild2(0).get());
  MavenBuild modBuild = (MavenBuild)b.getModuleLastBuilds().get(m.getModule("test:test"));
  TestResult tr = modBuild.getAction(SurefireReport.class).getResult();
        assertEquals(1,tr.getFailedTests().size());
        CaseResult cr = tr.getFailedTests().get(0);
        assertEquals("test.AppTest",cr.getClassName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.