/** * {@inheritDoc} */ public void setCustomWorkspace(String customWorkspace) throws IOException { CascadingUtil.getStringProjectProperty(this, CUSTOM_WORKSPACE_PROPERTY_NAME).setValue(customWorkspace); save(); }
/** * {@inheritDoc} */ public void setCustomWorkspace(String customWorkspace) throws IOException { CascadingUtil.getStringProjectProperty(this, CUSTOM_WORKSPACE_PROPERTY_NAME).setValue(customWorkspace); save(); }
/** * {@inheritDoc} */ public void setCustomWorkspace(String customWorkspace) throws IOException { CascadingUtil.getStringProjectProperty(this, CUSTOM_WORKSPACE_PROPERTY_NAME).setValue(customWorkspace); save(); }
/** * {@inheritDoc} */ public void setCustomWorkspace(String customWorkspace) throws IOException { CascadingUtil.getStringProjectProperty(this, CUSTOM_WORKSPACE_PROPERTY_NAME).setValue(customWorkspace); save(); }
/** * Creates a new freestyle project, builds it and ensures the rebuild action * is available on the project level. * * @throws Exception * Exception */ public void testWhenProjectWithoutParamsThenRebuildProjectEnabled() throws Exception { FreeStyleProject project = createFreeStyleProject(); project.scheduleBuild2(0); RebuildSettings settings = new RebuildSettings(false, false); project.addProperty(settings); project.save(); HtmlPage projectPage = createWebClient().getPage(project); WebAssert.assertLinkPresentWithText(projectPage, "Rebuild Last"); }
/** * Creates a new freestyle project, builds it and ensures the rebuild action * isn't available on the project level. * * @throws Exception * Exception */ public void testWhenProjectWithoutParamsThenRebuildProjectIsDisabled() throws Exception { FreeStyleProject project = createFreeStyleProject(); project.scheduleBuild2(0); RebuildSettings settings = new RebuildSettings(false, true); project.addProperty(settings); project.save(); HtmlPage projectPage = createWebClient().getPage(project); WebAssert.assertLinkNotPresentWithText(projectPage, "Rebuild Last"); }
@Test public void reloadJenkinsAndFindBuildInProgress() throws Exception { Folder f1 = r.jenkins.createProject(Folder.class, "f"); FreeStyleProject p1 = f1.createProject(FreeStyleProject.class, "test1"); FreeStyleBuild p1b1 = p1.scheduleBuild2(0).get(); // one completed build p1.getBuildersList().add(new SleepBuilder(99999999)); p1.save(); FreeStyleBuild p1b2 = p1.scheduleBuild2(0).waitForStart(); // another build in progress // trigger the full Jenkins reload r.jenkins.reload(); Folder f2 = (Folder) r.jenkins.getItem("f"); assertNotSame(f1,f2); FreeStyleProject p2 = (FreeStyleProject) f2.getItem("test1"); /* Fails now. Why was this here? assertNotSame(p1,p2); */ FreeStyleBuild p2b1 = p2.getBuildByNumber(1); FreeStyleBuild p2b2 = p2.getBuildByNumber(2); assertTrue(p2b2.isBuilding()); assertSame(p2b2,p1b2); assertNotSame(p1b1,p2b1); p1b2.getExecutor().interrupt(); // kill the executor }