/** * Polling log that triggered the build. */ public File getPollingLogFile() { return new File(run.getRootDir(),"polling.log"); }
/** * Gets the directory where the artifacts are archived. * @deprecated Should only be used from {@link StandardArtifactManager} or subclasses. */ @Deprecated public File getArtifactsDir() { return new File(getRootDir(),"archive"); }
/** * Returns the log file. * @return The file may reference both uncompressed or compressed logs */ public @Nonnull File getLogFile() { File rawF = new File(getRootDir(), "log"); if (rawF.isFile()) { return rawF; } File gzF = new File(getRootDir(), "log.gz"); if (gzF.isFile()) { return gzF; } //If both fail, return the standard, uncompressed log file return rawF; }
private @Nonnull XmlFile getDataFile() { return new XmlFile(XSTREAM,new File(getRootDir(),"build.xml")); }
/** * Sets the {@link #getResult} of this build. * Has no effect when the result is already set and worse than the proposed result. * May only be called after the build has started and before it has moved into post-production * (normally meaning both {@link #isInProgress} and {@link #isBuilding} are true). * @param r the proposed new result * @throws IllegalStateException if the build has not yet started, is in post-production, or is complete */ public void setResult(@Nonnull Result r) { if (state != State.BUILDING) { throw new IllegalStateException("cannot change build result while in " + state); } // result can only get worse if (result==null || r.isWorseThan(result)) { result = r; LOGGER.log(FINE, this + " in " + getRootDir() + ": result is set to " + r, LOGGER.isLoggable(Level.FINER) ? new Exception() : null); } }
/** * Add a <em>new</em> build to the map. * Do not use when loading existing builds (use {@link #put(Integer, Object)}). */ @Override public R put(R r) { // Defense against JENKINS-23152 and its ilk. File rootDir = r.getRootDir(); if (rootDir.isDirectory()) { throw new IllegalStateException("JENKINS-23152: " + rootDir + " already existed; will not overwrite with " + r); } if (!r.getClass().getName().equals("hudson.matrix.MatrixRun")) { // JENKINS-26739: grandfathered in proposeNewNumber(r.getNumber()); } rootDir.mkdirs(); return super._put(r); }
File rootDir = getRootDir(); if (!rootDir.isDirectory()) { throw new IOException(this + ": " + rootDir + " looks to have already been deleted; siblings: " + Arrays.toString(project.getBuildDir().list()));
/** * Returns the log file. */ public File getLogFile() { return new File(getRootDir(),"log"); }
/** * Gets the directory where the artifacts are archived. */ public File getArtifactsDir() { return new File(getRootDir(), "archive"); }
/** * Polling log that triggered the build. */ public File getPollingLogFile() { return new File(run.getRootDir(),"polling.log"); }
/** * Gets the directory where the Javadoc is stored for the given build. */ private static File getJavadocDir(Run run) { return new File(run.getRootDir(), "javadoc"); }
/** * Returns the log file. */ public File getLogFile() { return new File(getRootDir(), "log"); }
/** * Gets the directory where the Javadoc is stored for the given build. */ private static File getJavadocDir(Run run) { return new File(run.getRootDir(),"javadoc"); }
/** * Gets the directory where the Javadoc is stored for the given build. */ private static File getJavadocDir(Run run) { return new File(run.getRootDir(),"javadoc"); }
/** * Gets the directory where the artifacts are archived. */ public File getArtifactsDir() { return new File(getRootDir(),"archive"); }
/** * Gets the directory where the artifacts are archived. * @deprecated Should only be used from {@link StandardArtifactManager} or subclasses. */ @Deprecated public File getArtifactsDir() { return new File(getRootDir(),"archive"); }
public static File[] getPerformanceReportDirectory(Run<?, ?> build, String parserDisplayName, PrintStream logger) { File folder = new File( build.getRootDir() + "/" + PerformanceReportMap.getPerformanceReportFileRelativePath(parserDisplayName, "")); return folder.listFiles(); }
@Override public void copy(Run<?,?> original, Run<?,?> copy, TaskListener listener) throws IOException, InterruptedException { LibrariesAction action = original.getAction(LibrariesAction.class); if (action != null) { copy.addAction(new LibrariesAction(action.getLibraries())); FilePath libs = new FilePath(original.getRootDir()).child("libs"); if (libs.isDirectory()) { libs.copyRecursiveTo(new FilePath(copy.getRootDir()).child("libs")); } } }
private Object convert(String name, ParameterValue v) throws IOException, InterruptedException { if (v instanceof FileParameterValue) { FileParameterValue fv = (FileParameterValue) v; FilePath fp = new FilePath(run.getRootDir()).child(name); fp.copyFrom(fv.getFile()); return fp; } else { return v.getValue(); } }
private AnnotatedReport scanWithTool(final Run<?, ?> run, final FilePath workspace, final TaskListener listener, final Tool tool) throws IOException, InterruptedException { IssuesScanner issuesScanner = new IssuesScanner(tool, getFilters(), getSourceCodeCharset(), new FilePath(run.getRootDir()), blame(run, workspace, listener)); return issuesScanner.scan(run, workspace, new LogHandler(listener, tool.getActualName())); }