use of com.microsoft.azure.toolkit.lib.springcloud.task.DeploySpringCloudAppTask in project azure-tools-for-java by Microsoft.
the class SpringCloudDeploymentConfigurationState method execute.
@AzureOperation(name = "springcloud|app.create_update", params = { "this.config.getAppConfig().getAppName()" }, type = AzureOperation.Type.ACTION)
public SpringCloudDeployment execute(IAzureMessager messager) {
AzureMessager.getContext().setMessager(messager);
AzureTelemetry.getContext().setProperties(getTelemetryProperties());
final SpringCloudAppConfig appConfig = this.config.getAppConfig();
final DeploySpringCloudAppTask task = new DeploySpringCloudAppTask(appConfig);
final SpringCloudDeployment deployment = task.execute();
final SpringCloudApp app = deployment.app();
final SpringCloudCluster cluster = app.getCluster();
if (!deployment.waitUntilReady(GET_STATUS_TIMEOUT)) {
messager.warning(GET_DEPLOYMENT_STATUS_TIMEOUT, NOTIFICATION_TITLE);
}
printPublicUrl(app);
return deployment;
}
use of com.microsoft.azure.toolkit.lib.springcloud.task.DeploySpringCloudAppTask in project azure-tools-for-java by Microsoft.
the class CreateSpringCloudAppAction method createApp.
@AzureOperation(name = "springcloud|app.create", params = "config.getAppName()", type = AzureOperation.Type.ACTION)
private static void createApp(SpringCloudAppConfig config) {
AzureTaskManager.getInstance().runInBackground(AzureOperationBundle.title("springcloud|app.create", config.getAppName()), () -> {
final DeploySpringCloudAppTask task = new DeploySpringCloudAppTask(config);
final SpringCloudDeployment deployment = task.execute();
if (!deployment.waitUntilReady(GET_STATUS_TIMEOUT)) {
AzureMessager.getMessager().warning(GET_DEPLOYMENT_STATUS_TIMEOUT, NOTIFICATION_TITLE);
}
});
}
Aggregations