/** * @since 1.252 * @deprecated Use {@link #getLocations(EnvVars, Run)} for vars * expansion to be performed on all env vars rather than just * build parameters. */ public ModuleLocation[] getLocations(AbstractBuild<?,?> build) { return getLocations(null, build); }
@Override public FilePath getModuleRoot(FilePath workspace) { if (getLocations().length > 0) { return workspace.child(getLocations()[0].getLocalDir()); } return workspace; }
@Override public FilePath getModuleRoot(FilePath workspace) { if (getLocations().length > 0) { return workspace.child(getLocations()[0].getLocalDir()); } return workspace; }
/** * list of all configured svn locations * * @since 1.91 */ @Exported public ModuleLocation[] getLocations() { return getLocations(null); }
/** * list of all configured svn locations * * @since 1.91 */ @Exported public ModuleLocation[] getLocations() { return getLocations(null); }
@Override public String getKey() { StringBuilder b = new StringBuilder("svn"); for (ModuleLocation loc : getLocations()) { b.append(' ').append(loc.getURL()); } return b.toString(); }
/** * @deprecated */ @Override @Deprecated public FilePath getModuleRoot(FilePath workspace) { if (getLocations().length > 0) return workspace.child(getLocations()[0].getLocalDir()); return workspace; }
/** * list of all configured svn locations * * @since 1.91 */ @Exported public ModuleLocation[] getLocations() { return getLocations(null, null); }
@Override public boolean isBrowserReusable(SubversionSCM x, SubversionSCM y) { ModuleLocation[] xl = x.getLocations(), yl = y.getLocations(); if (xl.length != yl.length) { return false; } for (int i = 0; i < xl.length; i++) { if (!xl[i].getURL().equals(yl[i].getURL())) { return false; } } return true; }
@Override public boolean isBrowserReusable(SubversionSCM x, SubversionSCM y) { ModuleLocation[] xl = x.getLocations(), yl = y.getLocations(); if (xl.length != yl.length) return false; for (int i = 0; i < xl.length; i++) if (!xl[i].getURL().equals(yl[i].getURL())) return false; return true; }
@Override public boolean isBrowserReusable(SubversionSCM x, SubversionSCM y) { ModuleLocation[] xl = x.getLocations(), yl = y.getLocations(); if (xl.length != yl.length) { return false; } for (int i = 0; i < xl.length; i++) { if (!xl[i].getURL().equals(yl[i].getURL())) { return false; } } return true; }
public BuildRevisionMapTask(Run<?, ?> build, SubversionSCM parent, TaskListener listener, List<External> externals, EnvVars env) { this.listener = listener; this.externals = externals; this.locations = parent.getLocations(env, build); this.defaultAuthProvider = parent.createAuthenticationProvider(build.getParent(), null, listener); this.authProviders = new LinkedHashMap<String, ISVNAuthenticationProvider>(); for (ModuleLocation loc: locations) { authProviders.put(loc.remote, parent.createAuthenticationProvider(build.getParent(), loc, listener)); } }
@Deprecated @Override public FilePath[] getModuleRoots(FilePath workspace) { final ModuleLocation[] moduleLocations = getLocations(); if (moduleLocations.length > 0) { FilePath[] moduleRoots = new FilePath[moduleLocations.length]; for (int i = 0; i < moduleLocations.length; i++) { moduleRoots[i] = workspace.child(moduleLocations[i].getLocalDir()); } return moduleRoots; } return new FilePath[] { getModuleRoot(workspace) }; }
public BuildRevisionMapTask(AbstractBuild<?, ?> build, SubversionSCM parent, TaskListener listener, List<External> externals) { this.authProvider = parent.getDescriptor().createAuthenticationProvider(build.getParent()); this.listener = listener; this.externals = externals; this.locations = parent.getLocations(build); }
public BuildRevisionMapTask(AbstractBuild<?, ?> build, SubversionSCM parent, TaskListener listener, List<External> externals) { this.authProvider = parent.getDescriptor().createAuthenticationProvider(build.getParent()); this.listener = listener; this.externals = externals; this.locations = parent.getLocations(build); }
@Override public FilePath[] getModuleRoots(FilePath workspace) { final ModuleLocation[] moduleLocations = getLocations(); if (moduleLocations.length > 0) { FilePath[] moduleRoots = new FilePath[moduleLocations.length]; for (int i = 0; i < moduleLocations.length; i++) { moduleRoots[i] = workspace.child(moduleLocations[i].getLocalDir()); } return moduleRoots; } return new FilePath[]{getModuleRoot(workspace)}; }
@Override public FilePath[] getModuleRoots(FilePath workspace) { final ModuleLocation[] moduleLocations = getLocations(); if (moduleLocations.length > 0) { FilePath[] moduleRoots = new FilePath[moduleLocations.length]; for (int i = 0; i < moduleLocations.length; i++) { moduleRoots[i] = workspace.child(moduleLocations[i].getLocalDir()); } return moduleRoots; } return new FilePath[]{getModuleRoot(workspace)}; }
public CheckOutTask(AbstractBuild<?, ?> build, SubversionSCM scm, Date queueTime, Date buildTime, TaskListener listener) { this.authProvider = scm.getDescriptor().createAuthenticationProvider(build.getParent()); this.queueTime = queueTime; this.buildTime = buildTime; this.listener = listener; this.locations = scm.getLocations(build); this.revisionParameterAction = build.getAction(RevisionParameterAction.class); this.task = scm.getWorkspaceUpdater().createTask(); this.revisionPolicy = (scm.getDescriptor() != null ? scm.getDescriptor().getRevisionPolicy() : null); }
public CheckOutTask(AbstractBuild<?, ?> build, SubversionSCM scm, Date queueTime, Date buildTime, TaskListener listener) { this.authProvider = scm.getDescriptor().createAuthenticationProvider(build.getParent()); this.queueTime = queueTime; this.buildTime = buildTime; this.listener = listener; this.locations = scm.getLocations(build); this.revisionParameterAction = build.getAction(RevisionParameterAction.class); this.task = scm.getWorkspaceUpdater().createTask(); this.revisionPolicy = (scm.getDescriptor() != null ? scm.getDescriptor().getRevisionPolicy() : null); }
@Issue("JENKINS-10943") @Test public void getLocalDirWithAtRevision() throws Exception { // remote is not configured. SubversionSCM scm = new SubversionSCM("http://localhost/project@100", null); ModuleLocation[] locs = scm.getLocations(); assertEquals(1, locs.length); assertEquals("project", locs[0].getLocalDir()); }