Package hudson

Examples of hudson.FilePath.act()


  private void setDubboServiceVersion(AbstractBuild build, final BuildListener listener) throws IOException, InterruptedException {
    FilePath targetDir = build.getWorkspace().child("src//java.test//spring//esb//esb-client-provider.xml");
    listener.getLogger().println(targetDir);
   
    // replace the expect version into the esb-client-provider.xml file
    targetDir.act(new FileCallable<Void>() {
//      private static final long serialVersionUID = -4425754058302003580L;

      public Void invoke(File file, VirtualChannel channel) {
        listener.getLogger().println("[LOG]Begin Replace Dubbo Service Version:" + file.toString());
        replaceTxtByStr(file, version);
View Full Code Here


        final String url = getUrl(build);
        // Marshal the builder across the wire.
        DockerClient client = getDockerClient(build);
        final DockerClient.Builder builder = DockerClient.builder().fromClient(client);

        BuildCommandResponse response = fpChild.act(new FilePath.FileCallable<BuildCommandResponse>() {
            public BuildCommandResponse invoke(File f, VirtualChannel channel) throws IOException, InterruptedException {
                try {
                    listener.getLogger().println("Docker Build : build with tag " + tagToUse + " at path " + f.getAbsolutePath());
                    DockerClient client = builder
                            .readTimeout(3600000).build();
View Full Code Here

            listener.error(Messages.Fingerprinter_NoWorkspace());
            build.setResult(Result.FAILURE);
            return;
        }

        List<Record> records = ws.act(new FileCallable<List<Record>>() {
            public List<Record> invoke(File baseDir, VirtualChannel channel) throws IOException {
                List<Record> results = new ArrayList<Record>();

                FileSet src = Util.createFileSet(baseDir,targets);
View Full Code Here

    }

    public FilePath performInstallation(ToolInstallation tool, Node node, TaskListener log) throws IOException, InterruptedException {
        FilePath dir = preferredLocation(tool, node);
        if (dir.installIfNecessaryFrom(new URL(url), log, "Unpacking " + url + " to " + dir + " on " + node.getDisplayName())) {
            dir.act(new ChmodRecAPlusX());
        }
        if (subdir == null) {
            return dir;
        } else {
            return dir.child(subdir);
View Full Code Here

            }
            if (plain) {
                rsp.setContentType("text/plain;charset=UTF-8");
                OutputStream os = rsp.getOutputStream();
                try {
                    for (String kid : baseFile.act(new SimpleChildList())) {
                        os.write(kid.getBytes("UTF-8"));
                        os.write('\n');
                    }
                    os.flush();
                } finally {
View Full Code Here

                req.setAttribute("it", this);
                List<Path> parentPaths = buildParentPath(base,restSize);
                req.setAttribute("parentPath",parentPaths);
                req.setAttribute("backPath", createBackRef(restSize));
                req.setAttribute("topPath", createBackRef(parentPaths.size()+restSize));
                req.setAttribute("files", baseFile.act(glob));
                req.setAttribute("icon", icon);
                req.setAttribute("path", path);
                req.setAttribute("pattern",rest);
                req.setAttribute("dir", baseFile);
                req.getView(this,"dir.jelly").forward(req, rsp);
View Full Code Here

        if(rest.equals("*fingerprint*")) {
            rsp.forward(Hudson.getInstance().getFingerprint(baseFile.digest()),"/",req);
            return;
        }

        ContentInfo ci = baseFile.act(new ContentInfo());

        if(LOGGER.isLoggable(Level.FINE))
            LOGGER.fine("Serving "+baseFile+" with lastModified="+ci.lastModified+", contentLength="+ci.contentLength);

        InputStream in = baseFile.read();
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.