Search in sources :

Example 1 with RepoGenerationStrategy

use of org.jboss.pnc.bacon.pig.impl.config.RepoGenerationStrategy in project bacon by project-ncl.

the class OfflineManifestGenerator method sourceBuilds.

private Collection<PncBuild> sourceBuilds() {
    RepoGenerationData generationData = pigConfiguration.getFlow().getRepositoryGeneration();
    RepoGenerationStrategy strategy = generationData.getStrategy();
    if (!Arrays.asList(IGNORE, BUILD_GROUP).contains(strategy)) {
        return builds.values();
    }
    List<String> excludeSourceBuilds = generationData.getExcludeSourceBuilds();
    return builds.values().stream().filter(build -> !excludeSourceBuilds.contains(build.getName())).collect(Collectors.toList());
}
Also used : AddOn(org.jboss.pnc.bacon.pig.impl.addons.AddOn) GAV(org.jboss.pnc.bacon.pig.impl.utils.GAV) Arrays(java.util.Arrays) RepoGenerationStrategy(org.jboss.pnc.bacon.pig.impl.config.RepoGenerationStrategy) BuildInfoCollector(org.jboss.pnc.bacon.pig.impl.pnc.BuildInfoCollector) LoggerFactory(org.slf4j.LoggerFactory) PigConfiguration(org.jboss.pnc.bacon.pig.impl.config.PigConfiguration) HashSet(java.util.HashSet) RepositoryType(org.jboss.pnc.enums.RepositoryType) Map(java.util.Map) IGNORE(org.jboss.pnc.bacon.pig.impl.config.RepoGenerationStrategy.IGNORE) PncBuild(org.jboss.pnc.bacon.pig.impl.pnc.PncBuild) PrintWriter(java.io.PrintWriter) Logger(org.slf4j.Logger) FatalException(org.jboss.pnc.bacon.common.exception.FatalException) Collection(java.util.Collection) RepoGenerationData(org.jboss.pnc.bacon.pig.impl.config.RepoGenerationData) Collectors(java.util.stream.Collectors) FileNotFoundException(java.io.FileNotFoundException) StandardCharsets(java.nio.charset.StandardCharsets) List(java.util.List) BUILD_GROUP(org.jboss.pnc.bacon.pig.impl.config.RepoGenerationStrategy.BUILD_GROUP) Pattern(java.util.regex.Pattern) UnsupportedEncodingException(java.io.UnsupportedEncodingException) ArtifactWrapper(org.jboss.pnc.bacon.pig.impl.pnc.ArtifactWrapper) RepoGenerationStrategy(org.jboss.pnc.bacon.pig.impl.config.RepoGenerationStrategy) RepoGenerationData(org.jboss.pnc.bacon.pig.impl.config.RepoGenerationData)

Aggregations

FileNotFoundException (java.io.FileNotFoundException)1 PrintWriter (java.io.PrintWriter)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 StandardCharsets (java.nio.charset.StandardCharsets)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Map (java.util.Map)1 Pattern (java.util.regex.Pattern)1 Collectors (java.util.stream.Collectors)1 FatalException (org.jboss.pnc.bacon.common.exception.FatalException)1 AddOn (org.jboss.pnc.bacon.pig.impl.addons.AddOn)1 PigConfiguration (org.jboss.pnc.bacon.pig.impl.config.PigConfiguration)1 RepoGenerationData (org.jboss.pnc.bacon.pig.impl.config.RepoGenerationData)1 RepoGenerationStrategy (org.jboss.pnc.bacon.pig.impl.config.RepoGenerationStrategy)1 BUILD_GROUP (org.jboss.pnc.bacon.pig.impl.config.RepoGenerationStrategy.BUILD_GROUP)1 IGNORE (org.jboss.pnc.bacon.pig.impl.config.RepoGenerationStrategy.IGNORE)1 ArtifactWrapper (org.jboss.pnc.bacon.pig.impl.pnc.ArtifactWrapper)1 BuildInfoCollector (org.jboss.pnc.bacon.pig.impl.pnc.BuildInfoCollector)1