Package hudson.model

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


          EnvVars env = new EnvVars();
          action.buildEnvVars(b, env);
          lastReferenceValue = env.get(BuildInfoExporterAction.JOB_NAME_VARIABLE);
          assertEquals("downstream1", lastReferenceValue);
         
          b.save();
      }
     
      {
          FreeStyleProject p = jenkins.getItemByFullName("upstream", FreeStyleProject.class);
          assertNotNull(p);
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.