Examples of save()


Examples of hudson.model.AbstractBuild.save()

                DiskUsageBuildInformation information = new DiskUsageBuildInformation(build.getId(), build.number, 0l);
                buildDiskUsage.add(information);
                if(usage==null){
                    run.getActions().add(new BuildDiskUsageAction(build));
                    try {
                        build.save();
                    } catch (IOException ex) {
                        Logger.getLogger(ProjectDiskUsage.class.getName()).log(Level.SEVERE, null, ex);
                    }
                }
                else{
View Full Code Here

Examples of hudson.model.FreeStyleBuild.save()

   
    @Test
    public void testDoNotCalculateUnenabledDiskUsage() throws Exception{
        FreeStyleProject projectWithoutDiskUsage = j.jenkins.createProject(FreeStyleProject.class, "projectWithoutDiskUsage");
        FreeStyleBuild build = projectWithoutDiskUsage.createExecutable();
        build.save();
        DiskUsageProjectActionFactory.DESCRIPTOR.disableBuildsDiskUsageCalculation();
        BuildDiskUsageCalculationThread calculation = AperiodicWork.all().get(BuildDiskUsageCalculationThread.class);
        calculation.execute(TaskListener.NULL);
        assertEquals("Disk usage for build should not be counted.", 0l, DiskUsageTestUtil.getBuildDiskUsageAction(build).getAllDiskUsage(), 0);
        DiskUsageProjectActionFactory.DESCRIPTOR.enableBuildsDiskUsageCalculation();
View Full Code Here

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

Examples of hudson.model.Job.save()

        }
       
        h.copy(src,dst);
        Job newJob = (Job)Hudson.getInstance().getItem(dst);
        if (forceSave && null != newJob) {
            newJob.save();
        }
        return 0;
    }
}
View Full Code Here

Examples of hudson.model.TopLevelItem.save()

                    buildWrappersList.remove(toRemove);

                    String variablesAsPropertiesFile = squashVariables(variableValues);
                    ImplementationBuildWrapper implementationBuildWrapper = new ImplementationBuildWrapper(jobToClone.getName(), newJob.getName(), variablesAsPropertiesFile);
                    buildWrappersList.add(implementationBuildWrapper);
                    newJob.save();
                    result = newJob;
                    implementationBuildWrapper.sync();

                }
            }
View Full Code Here

Examples of hudson.model.User.save()

        // register the user
        User user = createAccount(si.username,si.password1);
        user.addProperty(new Mailer.UserProperty(si.email));
        user.setFullName(si.fullname);
        user.save();
        return user;
    }

    /**
     * Creates a new user account by registering a password to the user.
View Full Code Here

Examples of hudson.plugins.perforce.PerforceToolInstallation.DescriptorImpl.save()

        FreeStyleProject project = createFreeStyleProject();
        P4Web browser = new P4Web(new URL("http://localhost/"));
        PerforceToolInstallation tool = new PerforceToolInstallation("test_installation", "p4.exe", Collections.<ToolProperty<?>>emptyList());
        DescriptorImpl descriptor = (DescriptorImpl) Hudson.getInstance().getDescriptor(PerforceToolInstallation.class);
        descriptor.setInstallations(new PerforceToolInstallation[] { tool });
        descriptor.save();
        String password = "pass";
        PerforceSCM scm = new PerforceSCM(
                "user", password, "client", "port", "", "test_installation", "sysRoot",
                "sysDrive", "label", "counter", "upstreamProject", "shared", "charset", "charset2", "user", false, true, true, true, true, true, false,
                        false, false, true, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW);
View Full Code Here

Examples of hudson.plugins.scm_sync_configuration.ScmSyncConfigurationPlugin.save()

    SCM expectedScm = plugin.getSCM();
   
    // Persisting data
    mockStatic(SaveableListener.class);
    doNothing().when(SaveableListener.class); SaveableListener.fireOnChange((Saveable)notNull(), (XmlFile)notNull());
    plugin.save();
   
    // Then reloading it...
    PluginUtil.loadPlugin(plugin);
   
    // Verifying repositoryUrl & SCM
View Full Code Here

Examples of info.ata4.unity.asset.AssetFile.save()

            subAssetName += ".asset";
           
            Path subAssetFile = subAssetDir.resolve(subAssetName);
            if (Files.notExists(subAssetFile)) {
                L.log(Level.INFO, "Writing {0}", subAssetFile);
                subAsset.save(subAssetFile);
            }
        }
    }
}
View Full Code Here

Examples of info.magnolia.cms.core.Content.save()

        try
        {
            Content parent = jobNode.getParent();
            log.info("Trying to delete job {}...", jobNode.getName());
            jobNode.delete();
            parent.save();
            log.info("Job deleted successfully");
        }
        catch (RepositoryException e)
        {
            log.error(e.getMessage());
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.