Package hudson

Examples of hudson.FilePath.list()


        if (ws == null) {
            context.getListener().error("Error: No workspace found!");
        } else if (!StringUtils.isBlank(attachmentsPattern)) {
            attachments = new ArrayList<MimeBodyPart>();

            FilePath[] files = ws.list(ContentBuilder.transformText(attachmentsPattern, context, null));

            for (FilePath file : files) {
                if (maxAttachmentSize > 0
                        && (totalAttachmentSize + file.length()) >= maxAttachmentSize) {
                    context.getListener().getLogger().println("Skipping `" + file.getName()
View Full Code Here


        try {
            FilePath path = s.getWorkspaceRoot();
            if(path==nullreturn;

            List<FilePath> dirs = path.list(DIR_FILTER);
            if(dirs ==null) return;
            for (FilePath dir : dirs) {
                if(shouldBeDeleted(dir.getName(),dir,s))
                    delete(dir);
            }
View Full Code Here

        if (dev == null) {
            throw new AbortException("No such device: "+device);
        }

        FilePath ws = build.getWorkspace();
        FilePath[] files = ws.child(path).exists() ? new FilePath[]{ws.child(path)} : ws.list(path);
        if (files.length == 0) {
            listener.getLogger().println("No iOS apps found to deploy!");
            return false;
        }
View Full Code Here

        List<AbstractBuildParameters> result = Lists.newArrayList();

        try {
            FilePath workspace = getWorkspace(build);
            FilePath[] files = workspace.list(getFilePattern());
            if(files.length == 0) {
                noFilesFoundAction.failCheck(listener);
            } else {
                for(FilePath f: files) {
                    String parametersStr = ParameterizedTriggerUtils.readFileToString(f, getEncoding());
View Full Code Here

            int n = build.getWorkspace().copyRecursiveTo(getFilePattern(), target);

            if (n==0) {
                noFilesFoundAction.failCheck(listener);
            } else {
                for(final FilePath f: target.list(getFilePattern())) {
                    LOGGER.fine("Triggering build with " + f.getName());

                    result.add(new AbstractBuildParameters() {
                        @Override
                        public Action getAction(AbstractBuild<?,?> build, TaskListener listener) throws IOException, InterruptedException, DontTriggerException {
View Full Code Here

        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) {
        return rubyFilePath.substring(rubyFilePath.indexOf(path));
    }
View Full Code Here

    String parts[] = includes.split("\\s*[;:,]+\\s*");
    for (String path : parts) {
      FilePath src = workspace.child(path);
      if (src.exists()) {
        if (src.isDirectory()) {
          files.addAll(Arrays.asList(src.list("**/*")));
        } else {
          files.add(src);
        }
      }
    }
View Full Code Here


        // Package IPA
        if(buildIpa) {
            listener.getLogger().println("Cleaning up previously generate .ipa files");
            for(FilePath path : buildDirectory.list("*.ipa")) {
                path.delete();
            }

            listener.getLogger().println("Packaging IPA");
            List<FilePath> apps = buildDirectory.list(new AppFileFilter());
View Full Code Here

            for(FilePath path : buildDirectory.list("*.ipa")) {
                path.delete();
            }

            listener.getLogger().println("Packaging IPA");
            List<FilePath> apps = buildDirectory.list(new AppFileFilter());

            for(FilePath app : apps) {
                String baseName = app.getBaseName() + "-" + configuration + "-" + build.getProject().getName() + "-" + versionNumber;
                FilePath ipaLocation = buildDirectory.child(baseName + ".ipa");

View Full Code Here

        try {
            FilePath path = s.getWorkspaceRoot();
            if(path==nullreturn;

            List<FilePath> dirs = path.list(DIR_FILTER);
            if(dirs ==null) return;
            for (FilePath dir : dirs) {
                if(shouldBeDeleted(dir.getName(),dir,s))
                    delete(dir);
            }
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.