Package hudson.model

Examples of hudson.model.FreeStyleProject.save()


      */
    @Bug(13803)
    @Test
    public void testDeleteJob() throws Exception {
        FreeStyleProject freeStyleProject = jenkins.createProject(FreeStyleProject.class, "test");
        freeStyleProject.save();
        SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
        System.out.println("Before delete: "
                + sdf.format(new File(freeStyleProject.getRootDir(), "config.xml").lastModified()));
        freeStyleProject.delete();
        Thread.sleep(3 * 1000); // Give it a few seconds to create the file
View Full Code Here


        GerritServer gerritServer = PluginImpl.getInstance().getServer(PluginImpl.DEFAULT_SERVER_NAME);
        gerritServer.getConfig().setNumberOfSendingWorkerThreads(3);
        final int nrOfJobs = 3;
        FreeStyleProject project = DuplicatesUtil.createGerritTriggeredJob(j, "projectX");
        project.getBuildersList().add(new SleepBuilder(1000));
        project.save();
        for (int i = 0; i < nrOfJobs; i++) {
            String name = String.format("project%d", i);
            FreeStyleProject copyProject = (FreeStyleProject)j.jenkins.copy((TopLevelItem)project, name);
            boolean mode = (i & 1) == 0; // true for even numbers
            copyProject.getTrigger(GerritTrigger.class).setSilentStartMode(mode);
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.