use of org.jboss.pnc.bacon.pig.impl.config.PigConfiguration in project bacon by project-ncl.
the class ConfigReaderTest method shouldNotOverrideEnvironmentNameWithId.
@Test
void shouldNotOverrideEnvironmentNameWithId() {
PigConfiguration config = loadBuildConfig("/build-config-environment-override.yaml");
assertNotNull(config);
for (BuildConfig build : config.getBuilds()) {
if (build.getName().equals("profile-injection-1.0.0")) {
if (build.getRawEnvironmentId() != null && build.getEnvironmentName().equals("OpenJDK 1.8")) {
fail("The envId from defaultBuildParameters should not override if environmentName is declared");
}
}
}
}
use of org.jboss.pnc.bacon.pig.impl.config.PigConfiguration in project bacon by project-ncl.
the class ConfigReaderTest method shouldExpandVariables.
@Test
void shouldExpandVariables() {
PigConfiguration config = loadBuildConfig("/build-config-VarUsage.yaml");
assertNotNull(config);
if (!config.getVersion().equals("3.5.1")) {
fail("Version does not match predefined variable");
}
}
use of org.jboss.pnc.bacon.pig.impl.config.PigConfiguration in project bacon by project-ncl.
the class QuarkusCommunityDepAnalyzerTest method test.
@Test
@Disabled
void test() {
File tempFolder = Files.newTemporaryFolder();
System.out.println(tempFolder.getAbsolutePath());
File extras = new File(tempFolder, "extras");
extras.mkdir();
RepositoryData repositoryData = new RepositoryData();
repositoryData.setRepositoryPath(Paths.get(REPO_ZIP_PATH));
PigContext context = new PigContext();
PigConfiguration pigConfig = new PigConfiguration();
Flow flow = new Flow();
RepoGenerationData repositoryGeneration = new RepoGenerationData();
repositoryGeneration.setBomArtifactId("quarkus-bom");
flow.setRepositoryGeneration(repositoryGeneration);
pigConfig.setFlow(flow);
Map<String, Map<String, ?>> addons = new HashMap<>();
Map<String, Object> depAnalyzerConfig = new HashMap<>();
depAnalyzerConfig.put("skippedExtensions", asList("quarkus-resteasy-reactive-kotlin", "quarkus-mongodb-client"));
addons.put(QuarkusCommunityDepAnalyzer.NAME, depAnalyzerConfig);
pigConfig.setAddons(addons);
context.setPigConfiguration(pigConfig);
context.setRepositoryData(repositoryData);
PigContext.setInstance(context);
Config instance = new Config();
ConfigProfile configProfile = new ConfigProfile();
PigConfig pig = new PigConfig();
pig.setIndyUrl(INDY_URL);
configProfile.setPig(pig);
DaConfig da = new DaConfig();
da.setUrl(DA_URL);
configProfile.setDa(da);
instance.setActiveProfile(configProfile);
Config.setInstance(instance);
QuarkusCommunityDepAnalyzer analyzer = new QuarkusCommunityDepAnalyzer(pigConfig, Collections.emptyMap(), tempFolder.getAbsolutePath(), extras.getAbsolutePath(), new Deliverables());
analyzer.trigger();
}
use of org.jboss.pnc.bacon.pig.impl.config.PigConfiguration in project bacon by project-ncl.
the class QuarkusPostBuildAnalyzerTest method preConfig.
private PigConfiguration preConfig() {
PigConfiguration config = new PigConfiguration();
HashMap<String, Map<String, ?>> addons = new HashMap<>();
HashMap<String, Object> addOnConfig = new HashMap<>();
addOnConfig.put("stagingPath", "http://localhost:8080/");
addOnConfig.put("productName", "quarkus");
addons.put(QuarkusPostBuildAnalyzer.NAME, addOnConfig);
config.setAddons(addons);
return config;
}
use of org.jboss.pnc.bacon.pig.impl.config.PigConfiguration in project bacon by project-ncl.
the class PigFacade method generateJavadoc.
public static void generateJavadoc() {
abortIfContextDataAbsent();
PigContext context = context();
context.getDeliverables().setJavadocZipName(context.getPrefix() + "-javadoc.zip");
PigConfiguration pigConfiguration = context.getPigConfiguration();
Map<String, PncBuild> builds = context.getBuilds();
new JavadocManager(pigConfiguration, context.getReleasePath(), context.getDeliverables(), builds).prepare();
}
Aggregations