public Fabric8MavenPluginResourceGeneratorBuilder withProperties(List<String> propertiesPairs) { return withProperties(propertiesPairs.toArray(new String[propertiesPairs.size()])); }
public Fabric8MavenPluginResourceGeneratorBuilder withProperties(List<String> propertiesPairs) { return withProperties(propertiesPairs.toArray(new String[propertiesPairs.size()])); }
@Test public void should_build_images_and_generate_resources() throws IOException { // given final String rootPath = temporaryFolder.getRoot().toString() + "spring-boot-http-booster"; copyDirectory(Paths.get("src/test/resources/spring-boot-http-booster"), Paths.get(rootPath)); // when new Fabric8MavenPluginResourceGeneratorBuilder() .namespace(namespace) .quiet() .withProperties("version.cube", System.getProperty("version.cube", "1.15.3")) .pluginConfigurationIn(Paths.get(rootPath, "pom.xml")) .build(); // then final File resources = Paths.get(rootPath, "target/classes/META-INF/fabric8").toFile(); final File build = Paths.get(rootPath, "target/docker").toFile(); assertThat(resources.listFiles()).isNotEmpty(); assertThat(resources.listFiles()).contains(Paths.get(resources.toString(), "kubernetes.json").toFile(), Paths.get( resources.toString(), "openshift.json").toFile()); assertThat(build.listFiles()).isNotEmpty(); }
@Override public void start() { Logger log = session.getLogger(); log.status("Using Kubernetes at: " + client.getMasterUrl()); createNamespace(); if (configuration.isFmpBuildEnabled() || (configuration.isFmpBuildForMavenDisable() && !isRunningFromMaven())) { new Fabric8MavenPluginResourceGeneratorBuilder() .namespace(session.getNamespace()) .debug(configuration.isFmpDebugOutput()) .quiet(!configuration.isFmpLogsEnabled()) .addMavenOpts(configuration.getFmpBuildOptions()) .pluginConfigurationIn(Paths.get("", configuration.getFmpPomPath())) .profiles(configuration.getFmpProfiles()) .withProperties(configuration.getFmpSystemProperties()) .build(); } watchListener.setupConsoleListener(); if (configuration.isLogCopyEnabled()) { watchListener.setupEventListener(); } addShutdownHook(); try { createEnvironment(); } catch (Throwable t){ removeShutdownHook(); throw t; } }
@Override public void start() { Logger log = session.getLogger(); log.status("Using Kubernetes at: " + client.getMasterUrl()); createNamespace(); if (configuration.isFmpBuildEnabled() || (configuration.isFmpBuildForMavenDisable() && !isRunningFromMaven())) { new Fabric8MavenPluginResourceGeneratorBuilder() .namespace(session.getNamespace()) .debug(configuration.isFmpDebugOutput()) .quiet(!configuration.isFmpLogsEnabled()) .addMavenOpts(configuration.getFmpBuildOptions()) .pluginConfigurationIn(Paths.get("", configuration.getFmpPomPath())) .profiles(configuration.getFmpProfiles()) .withProperties(configuration.getFmpSystemProperties()) .build(); } watchListener.setupConsoleListener(); if (configuration.isLogCopyEnabled()) { watchListener.setupEventListener(); } addShutdownHook(); try { createEnvironment(); } catch (Throwable t){ removeShutdownHook(); throw t; } }