Search in sources :

Example 1 with AppEngineDeploymentConfiguration

use of com.google.cloud.tools.intellij.appengine.cloud.AppEngineDeploymentConfiguration in project google-cloud-intellij by GoogleCloudPlatform.

the class AppEngineFlexibleStageTest method setUp.

@Before
public void setUp() {
    FacetManager.getInstance(javaModule).getFacetByType(AppEngineFlexibleFacet.getFacetType().getId()).getConfiguration().setAppYamlPath(javaYaml.getPath());
    FacetManager.getInstance(customModule).getFacetByType(AppEngineFlexibleFacet.getFacetType().getId()).getConfiguration().setAppYamlPath(customYaml.getPath());
    FacetManager.getInstance(noYamlModule).getFacetByType(AppEngineFlexibleFacet.getFacetType().getId()).getConfiguration().setAppYamlPath("some/invalid/path");
    deploymentConfiguration = new AppEngineDeploymentConfiguration();
    deploymentConfiguration.setModuleName(javaModule.getName());
    stage = new AppEngineFlexibleStage(mockLoggingHandler, warArtifact.toPath(), deploymentConfiguration, testFixture.getProject());
}
Also used : AppEngineDeploymentConfiguration(com.google.cloud.tools.intellij.appengine.cloud.AppEngineDeploymentConfiguration) Before(org.junit.Before)

Example 2 with AppEngineDeploymentConfiguration

use of com.google.cloud.tools.intellij.appengine.cloud.AppEngineDeploymentConfiguration in project google-cloud-intellij by GoogleCloudPlatform.

the class AppEngineFlexibleSupportProvider method setupDeploymentRunConfiguration.

private static void setupDeploymentRunConfiguration(Module module) {
    RunManager runManager = RunManager.getInstance(module.getProject());
    if (!hasFlexibleDeploymentConfiguration(runManager.getAllConfigurationsList())) {
        AppEngineCloudType serverType = ServerType.EP_NAME.findExtension(AppEngineCloudType.class);
        DeployToServerConfigurationType configurationType = DeployToServerConfigurationTypesRegistrar.getDeployConfigurationType(serverType);
        RunnerAndConfigurationSettings settings = runManager.createRunConfiguration(configurationType.getDisplayName(), configurationType.getFactory());
        // Sets the GAE Flex server, if any exists, in the run config.
        DeployToServerRunConfiguration<?, AppEngineDeploymentConfiguration> runConfiguration = (DeployToServerRunConfiguration<?, AppEngineDeploymentConfiguration>) settings.getConfiguration();
        RemoteServer<AppEngineServerConfiguration> server = ContainerUtil.getFirstItem(RemoteServersManager.getInstance().getServers(serverType));
        if (server != null) {
            runConfiguration.setServerName(server.getName());
        }
        runManager.addConfiguration(settings, false);
    }
}
Also used : DeployToServerConfigurationType(com.intellij.remoteServer.impl.configuration.deployment.DeployToServerConfigurationType) AppEngineServerConfiguration(com.google.cloud.tools.intellij.appengine.cloud.AppEngineServerConfiguration) AppEngineDeploymentConfiguration(com.google.cloud.tools.intellij.appengine.cloud.AppEngineDeploymentConfiguration) AppEngineCloudType(com.google.cloud.tools.intellij.appengine.cloud.AppEngineCloudType) RunnerAndConfigurationSettings(com.intellij.execution.RunnerAndConfigurationSettings) RunManager(com.intellij.execution.RunManager) DeployToServerRunConfiguration(com.intellij.remoteServer.impl.configuration.deployment.DeployToServerRunConfiguration)

Example 3 with AppEngineDeploymentConfiguration

use of com.google.cloud.tools.intellij.appengine.cloud.AppEngineDeploymentConfiguration in project google-cloud-intellij by GoogleCloudPlatform.

the class AppEngineFlexibleDeploymentEditorTest method setUp.

@Before
public void setUp() {
    FacetManager.getInstance(javaModule).getFacetByType(AppEngineFlexibleFacet.getFacetType().getId()).getConfiguration().setAppYamlPath(javaYaml.getPath());
    AppEngineFlexibleFacetConfiguration customConfig = FacetManager.getInstance(customModule).getFacetByType(AppEngineFlexibleFacet.getFacetType().getId()).getConfiguration();
    customConfig.setAppYamlPath(customYaml.getPath());
    customConfig.setDockerDirectory(dockerfile.getParentFile().getPath());
    userSpecifiedPathDeploymentSource = new UserSpecifiedPathDeploymentSource(ModulePointerManager.getInstance(testFixture.getProject()).create(UserSpecifiedPathDeploymentSource.moduleName));
    configuration = new AppEngineDeploymentConfiguration();
    editor = new AppEngineFlexibleDeploymentEditor(testFixture.getProject(), deploymentSource);
    editor.setAppInfoPanel(appInfoPanel);
    editor.getCommonConfig().setProjectSelector(projectSelector);
}
Also used : AppEngineDeploymentConfiguration(com.google.cloud.tools.intellij.appengine.cloud.AppEngineDeploymentConfiguration) AppEngineFlexibleFacetConfiguration(com.google.cloud.tools.intellij.appengine.facet.flexible.AppEngineFlexibleFacetConfiguration) Before(org.junit.Before)

Example 4 with AppEngineDeploymentConfiguration

use of com.google.cloud.tools.intellij.appengine.cloud.AppEngineDeploymentConfiguration in project google-cloud-intellij by GoogleCloudPlatform.

the class AppEngineStandardDeploymentEditorTest method setUp.

@Before
public void setUp() {
    configuration = new AppEngineDeploymentConfiguration();
    editor = new AppEngineStandardDeploymentEditor(testFixture.getProject(), deploymentSource);
    editor.getCommonConfig().setProjectSelector(projectSelector);
}
Also used : AppEngineDeploymentConfiguration(com.google.cloud.tools.intellij.appengine.cloud.AppEngineDeploymentConfiguration) Before(org.junit.Before)

Aggregations

AppEngineDeploymentConfiguration (com.google.cloud.tools.intellij.appengine.cloud.AppEngineDeploymentConfiguration)4 Before (org.junit.Before)3 AppEngineCloudType (com.google.cloud.tools.intellij.appengine.cloud.AppEngineCloudType)1 AppEngineServerConfiguration (com.google.cloud.tools.intellij.appengine.cloud.AppEngineServerConfiguration)1 AppEngineFlexibleFacetConfiguration (com.google.cloud.tools.intellij.appengine.facet.flexible.AppEngineFlexibleFacetConfiguration)1 RunManager (com.intellij.execution.RunManager)1 RunnerAndConfigurationSettings (com.intellij.execution.RunnerAndConfigurationSettings)1 DeployToServerConfigurationType (com.intellij.remoteServer.impl.configuration.deployment.DeployToServerConfigurationType)1 DeployToServerRunConfiguration (com.intellij.remoteServer.impl.configuration.deployment.DeployToServerRunConfiguration)1