public Set<File> getAllProfiles(List<File> serviceSpecs, String profileName) throws HyscaleException {
        if (serviceSpecs == null || StringUtils.isBlank(profileName)) {
            return null;
        }
        Set<File> profileFiles = new HashSet<File>();
        for (File serviceSpec : serviceSpecs) {
            String serviceSpecPath = serviceSpec.getAbsoluteFile().getParent();
            String profileFilePattern = getProfileNamePattern(profileName, ServiceSpecUtil.getServiceName(serviceSpec));

            // Search for profile relative to servicespec directory
            List<File> serviceProfileFiles = HyscaleFilesUtil.listFilesWithPattern(serviceSpecPath, profileFilePattern);
            if (serviceProfileFiles != null && !serviceProfileFiles.isEmpty()) {
                profileFiles.addAll(serviceProfileFiles);
            }

            // Search for profile relative to servicespec/profiles directory
            serviceSpecPath = serviceSpecPath.concat(ToolConstants.FILE_SEPARATOR)
                    .concat(ToolConstants.PROFILES_DIR_NAME);
            serviceProfileFiles = HyscaleFilesUtil.listFilesWithPattern(serviceSpecPath, profileFilePattern);
            if (serviceProfileFiles != null && !serviceProfileFiles.isEmpty()) {
                profileFiles.addAll(serviceProfileFiles);
            }
        }
        return profileFiles;
    }
Fetches the profile files of service specs relative to the servicespec directory
and dir(servicespec)/profiles directory.

@param serviceSpecs
@param profileName
@return
workflow-controller/controller-service/src/main/java/io/hyscale/controller/commands/args/ProfileLocator.java