@Override public Collection<? extends Job> getAllJobs() { Set<Job> jobs = new HashSet<Job>(getItems()); jobs.add(this); return jobs; }
@Override public Collection<? extends Job> getAllJobs() { Set<Job> jobs = new HashSet<Job>(getItems()); jobs.add(this); return jobs; }
@Override public Collection<? extends Job> getAllJobs() { Set<Job> jobs = new HashSet<Job>(getItems()); jobs.add(this); return jobs; }
@Override public Collection<? extends Job> getAllJobs() { Set<Job> jobs = new HashSet<Job>(getItems()); jobs.add(this); return jobs; }
@Override public Collection<? extends Job> getAllJobs() { Set<Job> jobs = new HashSet<Job>(getItems()); jobs.add(this); return jobs; }
/** * Returns all {@link MatrixRun}s for this {@link MatrixBuild}. */ public List<MatrixRun> getRuns() { List<MatrixRun> r = new ArrayList<MatrixRun>(); for (MatrixConfiguration c : getParent().getItems()) { MatrixRun b = c.getBuildByNumber(getNumber()); if (b != null) { r.add(b); } } return r; }
/** * Returns all {@link MatrixRun}s for this {@link MatrixBuild}. */ @Exported public List<MatrixRun> getRuns() { List<MatrixRun> r = new ArrayList<MatrixRun>(); for(MatrixConfiguration c : getParent().getItems()) { MatrixRun b = getRunForConfiguration(c); if (b != null) r.add(b); } return r; }
/** * Returns all {@link MatrixRun}s for this {@link MatrixBuild}. */ public List<MatrixRun> getRuns() { List<MatrixRun> r = new ArrayList<MatrixRun>(); for (MatrixConfiguration c : getParent().getItems()) { MatrixRun b = c.getBuildByNumber(getNumber()); if (b != null) { r.add(b); } } return r; }
/** * Returns all {@link MatrixRun}s for this {@link MatrixBuild}. */ public List<MatrixRun> getRuns() { List<MatrixRun> r = new ArrayList<MatrixRun>(); for (MatrixConfiguration c : getParent().getItems()) { MatrixRun b = c.getBuildByNumber(getNumber()); if (b != null) { r.add(b); } } return r; }
/** * Returns all {@link MatrixRun}s for exactly this {@link MatrixBuild}. * <p> * Unlike {@link #getRuns()}, this method excludes those runs * that didn't run and got inherited. * @since 1.413 */ public List<MatrixRun> getExactRuns() { List<MatrixRun> r = new ArrayList<MatrixRun>(); for(MatrixConfiguration c : getParent().getItems()) { MatrixRun b = c.getBuildByNumber(getNumber()); if (b != null) r.add(b); } return r; }
/** * Returns all {@link MatrixRun}s for this {@link MatrixBuild}. */ public List<MatrixRun> getRuns() { List<MatrixRun> r = new ArrayList<MatrixRun>(); for (MatrixConfiguration c : getParent().getItems()) { MatrixRun b = c.getBuildByNumber(getNumber()); if (b != null) { r.add(b); } } return r; }
public AbstractProject<?, ?> findProject(final String projectName) { checkProjectName(projectName); // Handle matrix-project/configuration projects. // First part is matrix-project name, second part is // matrix-configuration name String[] parts = projectName.split("/", 2); if (parts.length == 2) { log.debug("Detected matrix name: {}", projectName); AbstractProject<?, ?> parent = findProject(parts[0]); if (parent instanceof MatrixProject) { for (MatrixConfiguration config : ((MatrixProject) parent).getItems()) { if (parts[1].equals(config.getName())) { log.debug("Selected matrix configuration: {}", config); // config.checkPermission(Item.READ); // TODO needed? return config; } } } } if (!getProjectNames().contains(projectName)) { log.debug("Project {} not in the list of job names.", projectName); return null; } AbstractProject<?, ?> project = getProjectByFullName(projectName); log.debug("Selected project: {}", project); return project; }
public AbstractProject<?, ?> findProject(final String projectName) { checkProjectName(projectName); // Handle matrix-project/configuration projects. // First part is matrix-project name, second part is // matrix-configuration name String[] parts = projectName.split("/", 2); if (parts.length == 2) { log.debug("Detected matrix name: {}", projectName); AbstractProject<?, ?> parent = findProject(parts[0]); if (parent instanceof MatrixProject) { for (MatrixConfiguration config : ((MatrixProject) parent).getItems()) { if (parts[1].equals(config.getName())) { log.debug("Selected matrix configuration: {}", config); // config.checkPermission(Item.READ); // TODO needed? return config; } } } } if (!getProjectNames().contains(projectName)) { log.debug("Project {} not in the list of job names.", projectName); return null; } AbstractProject<?, ?> project = getProjectByFullName(projectName); log.debug("Selected project: {}", project); return project; }
/** * Clean item related workspaces. * * @param item * The item * @param name * The name to use to compute the workspace location */ public static void delete(Item item, String name) { // Check if this is a matrix project if (item instanceof MatrixProject) // Go threw the configurations for (MatrixConfiguration configuration : ((MatrixProject) item).getItems()) { // Get workspace Workspace workspace = fromProject(configuration, name); // Check if exists if (workspace != null) // Delete it workspace.delete(); } // Check if this is a real project else if (item instanceof Project) { // Get workspace Workspace workspace = fromProject((Project<?, ?>) item, name); // Check if exists if (workspace != null) // Delete it workspace.delete(); } }