Package hudson

Examples of hudson.FilePath.toURI()


                // http://host/hudson/job/foo/123/artifact/src/Foo.java
                // Careful with path separator between $1 and $2:
                // workspaceDir will not normally end with one;
                // workspaceDir.toURI() will end with '/' if and only if workspaceDir.exists() at time of call
                wsPattern = Pattern.compile("(" +
                    Pattern.quote(ws.getRemote()) + "|" + Pattern.quote(ws.toURI().toString()) + ")[/\\\\]?([^:#\\s]*)");
            }
            for (String line : lines) {
                line = line.replace('\0',' '); // shall we replace other control code? This one is motivated by http://www.nabble.com/Problems-with-NULL-characters-in-generated-output-td25005177.html
                if (wsPattern != null) {
                    // Perl: $line =~ s{$rx}{$path = $2; $path =~ s!\\\\!/!g; $workspaceUrl . $path}eg;
View Full Code Here


     * @author Chris Lewis
     */
    private FilePath copyToLocalWorkspace(FilePath currentWorkspace) throws
      InterruptedException, IOException {
      FilePath newSourceLocation = (new FilePath(new File(System.getProperty("java.io.tmpdir"))).createTempDir("hudson-jdepend", ""));
      log("Copying remote data to " + newSourceLocation.toURI());
      currentWorkspace.copyRecursiveTo(newSourceLocation);
      log("Copy complete");

      return newSourceLocation;
    }
View Full Code Here

        /**
         * Make sure we actually have paths to where we want to go. Without
         * paths, we have to fail out.
         */
        try {
          sourcePath = sourceLocation.toURI().getPath();
        }
        catch (Exception e) {
          log("Unable to get workspace path: " + e);
          return false;
        }
View Full Code Here

    private FilePath[] getRubyFiles(FilePath workspace, File buildRootDir, String relativePath, Launcher launcher) throws InterruptedException, IOException {
        moveReportsToBuildRootDir(workspace, buildRootDir, launcher.getListener(), relativePath, "**/*.rb", true);

        FilePath classesLocation = new FilePath(new File(buildRootDir, relativePath));
        launcher.getListener().getLogger().println("searching ruby classes into: " + classesLocation.toURI().getPath());

        return classesLocation.list("**/*.rb");
    }

    private String prettifyFilePath(String path, String rubyFilePath) {
View Full Code Here

                // http://host/hudson/job/foo/123/artifact/src/Foo.java
                // Careful with path separator between $1 and $2:
                // workspaceDir will not normally end with one;
                // workspaceDir.toURI() will end with '/' if and only if workspaceDir.exists() at time of call
                wsPattern = Pattern.compile("(" +
                    Pattern.quote(ws.getRemote()) + "|" + Pattern.quote(ws.toURI().toString())
                    + ")[/\\\\]?([^:#\\s]*)");
            }
            for (String line : lines) {
                line = line.replace('\0',
                    ' '); // shall we replace other control code? This one is motivated by http://www.nabble.com/Problems-with-NULL-characters-in-generated-output-td25005177.html
View Full Code Here

    logInfo(logger, "resizing image " + imagePath.getRemote() + " to " + this.width + "x" + this.height);
  }

  private RandomAccessFile getImageFile(FilePath moduleRoot) throws IOException, InterruptedException {
    FilePath imagePath = getImagePath(moduleRoot);
    File file = new File(imagePath.toURI());
    return new RandomAccessFile(file, "rw");
  }

  private void resizeBio(RandomAccessFile file) throws IOException {
    file.seek(24L);
View Full Code Here

  @Override
  public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
      throws InterruptedException, IOException {

    FilePath imagePath = getImagePath(build.getModuleRoot());
    File file = new File(imagePath.toURI());
    RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw");
    try {
      FileChannel channel = randomAccessFile.getChannel();
      MappedByteBuffer buffer = channel.map(MapMode.READ_WRITE, 24L, 4L);
      buffer.put(this.getDimensionMask());
View Full Code Here

    logInfo(logger, "resizing image " + imagePath.getRemote() + " to " + this.width + "x" + this.height);
  }

  private RandomAccessFile getImageFile(FilePath moduleRoot) throws IOException, InterruptedException {
    FilePath imagePath = getImagePath(moduleRoot);
    File file = new File(imagePath.toURI());
    return new RandomAccessFile(file, "rw");
  }

  private void resizeBio(RandomAccessFile file) throws IOException {
    file.seek(24L);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.