use of com.google.cloud.tools.appengine.cloudsdk.CloudSdk in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineStandardStage method stage.
/**
* Stage the application in preparation for deployment to the App Engine standard environment.
*
* @param stagingDirectory the local staging directory
* @param onStageComplete a callback for executing actions on completion of staging
*/
public void stage(@NotNull Path stagingDirectory, @NotNull ProcessStartListener startListener, @NotNull ProcessExitListener onStageComplete) {
ProcessOutputLineListener outputListener = new ProcessOutputLineListener() {
@Override
public void onOutputLine(String line) {
loggingHandler.print(line + "\n");
}
};
CloudSdk sdk = helper.createSdk(loggingHandler, startListener, outputListener, outputListener, onStageComplete);
// TODO determine the default set of flags we want to set for AE standard staging
DefaultStageStandardConfiguration stageConfig = new DefaultStageStandardConfiguration();
stageConfig.setEnableJarSplitting(true);
// TODO(joaomartins): Change File to Path on library configs.
stageConfig.setStagingDirectory(stagingDirectory.toFile());
stageConfig.setSourceDirectory(deploymentArtifactPath.toFile());
CloudSdkAppEngineStandardStaging staging = new CloudSdkAppEngineStandardStaging(sdk);
staging.stageStandard(stageConfig);
}
use of com.google.cloud.tools.appengine.cloudsdk.CloudSdk in project app-maven-plugin by GoogleCloudPlatform.
the class AbstractMojoIntegrationTest method deleteService.
protected void deleteService(String service) throws ProcessRunnerException, CloudSdkNotFoundException, CloudSdkOutOfDateException, CloudSdkVersionFileException, InvalidJavaSdkException {
CloudSdk cloudSdk = new CloudSdk.Builder().exitListener(new NonZeroExceptionExitListener()).build();
cloudSdk.runAppCommand(Arrays.asList("services", "delete", service));
}
Aggregations