@Override protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws IOException, InterruptedException { String customWorkspace = getProject().getCustomWorkspace(); if (customWorkspace != null) // we allow custom workspaces to be concurrently used between jobs. return Lease.createDummyLease(n.getRootPath().child(getEnvironment(listener).expand(customWorkspace))); return super.decideWorkspace(n,wsl); } }
@Override protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws IOException, InterruptedException { String customWorkspace = getProject().getCustomWorkspace(); if (customWorkspace != null) // we allow custom workspaces to be concurrently used between jobs. { return Lease.createDummyLease(n.getRootPath().child(getEnvironment(listener).expand(customWorkspace))); } return super.decideWorkspace(n, wsl); } }
@Override protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws IOException, InterruptedException { String customWorkspace = getProject().getCustomWorkspace(); if (customWorkspace != null) // we allow custom workspaces to be concurrently used between jobs. return Lease.createDummyLease(n.getRootPath().child(getEnvironment(listener).expand(customWorkspace))); return super.decideWorkspace(n,wsl); } }
@Override protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws IOException, InterruptedException { String customWorkspace = getProject().getCustomWorkspace(); if (customWorkspace != null) // we allow custom workspaces to be concurrently used between jobs. return Lease.createDummyLease(n.getRootPath().child(getEnvironment(listener).expand(customWorkspace))); return super.decideWorkspace(n,wsl); } }
@Bug(10706) @Test public void testGetNoBranchFromBranch() throws Exception { initRepoWithTag(); FreeStyleProject p = j.createFreeStyleProject(); p.setScm(new MercurialSCM(hgInstallation(), repo.getPath(), MercurialSCM.RevisionType.BRANCH, "default", null, null, null, false, null)); FreeStyleBuild b = j.buildAndAssertSuccess(p); MercurialTagAction action = b.getAction(MercurialTagAction.class); assertNotNull(action); assertEquals(null, action.getBranch()); assertEquals(null, b.getEnvironment().get("MERCURIAL_REVISION_BRANCH")); }
@Bug(10706) @Test public void testGetBranchFromTag() throws Exception { initRepoWithTag(); FreeStyleProject p = j.createFreeStyleProject(); p.setScm(new MercurialSCM(hgInstallation(), repo.getPath(), MercurialSCM.RevisionType.TAG, "release", null, null, null, false, null)); FreeStyleBuild b = j.buildAndAssertSuccess(p); MercurialTagAction action = b.getAction(MercurialTagAction.class); assertNotNull(action); assertEquals("stable", action.getBranch()); assertEquals("stable", b.getEnvironment().get("MERCURIAL_REVISION_BRANCH")); }