use of org.kie.workbench.common.screens.projecteditor.client.editor.DefaultDeploymentPopupDriver in project kie-wb-common by kiegroup.
the class ProductionBuildAndDeployExecutor method buildDeployWithMultipleServerTemplates.
@Override
void buildDeployWithMultipleServerTemplates(final BuildExecutionContext context, final List<ServerTemplate> serverTemplates) {
context.setServerTemplate(serverTemplates.get(0));
deploymentPopup.show(new DefaultDeploymentPopupDriver(context, DeploymentPopup.Mode.MULTIPLE_SERVER, () -> serverTemplates, () -> buildAndDeploy(context, DeploymentMode.VALIDATED), () -> finish()));
}
use of org.kie.workbench.common.screens.projecteditor.client.editor.DefaultDeploymentPopupDriver in project kie-wb-common by kiegroup.
the class ProductionBuildAndDeployExecutor method buildDeployWithOneServerTemplate.
@Override
void buildDeployWithOneServerTemplate(final BuildExecutionContext context, final ServerTemplate serverTemplate) {
final Set<String> existingContainers = BuildUtils.extractExistingContainers(serverTemplate);
context.setServerTemplate(serverTemplate);
if (!existingContainers.contains(context.getContainerId())) {
buildAndDeploy(context, DeploymentMode.VALIDATED);
} else {
deploymentPopup.show(new DefaultDeploymentPopupDriver(context, DeploymentPopup.Mode.SINGLE_SERVER, () -> Collections.EMPTY_LIST, () -> buildAndDeploy(context, DeploymentMode.VALIDATED), () -> finish()));
}
}
use of org.kie.workbench.common.screens.projecteditor.client.editor.DefaultDeploymentPopupDriver in project kie-wb-common by kiegroup.
the class SnapshotBuildAndDeployExecutor method buildDeployWithMultipleServerTemplates.
@Override
void buildDeployWithMultipleServerTemplates(BuildExecutionContext context, List<ServerTemplate> serverTemplates) {
GAV gav = context.getModule().getPom().getGav();
Optional<SnapshotDeployment> optional = settings.getDeployment(gav.getGroupId(), gav.getArtifactId());
if (optional.isPresent()) {
SnapshotDeployment previousDeployment = optional.get();
Optional<ServerTemplate> serverOptional = serverTemplates.stream().filter(s -> s.getId().equals(previousDeployment.getServer())).findFirst();
if (serverOptional.isPresent()) {
buildDeployWithOneServerTemplate(context, serverOptional.get());
return;
}
}
context.setServerTemplate(serverTemplates.get(0));
deploymentPopup.show(new DefaultDeploymentPopupDriver(context, DeploymentPopup.Mode.MULTIPLE_SERVER_FORCED, () -> serverTemplates, () -> buildDeployWithOneServerTemplate(context, context.getServerTemplate()), () -> finish()));
}
Aggregations