Search in sources :

Example 1 with IWebAppBase

use of com.microsoft.azure.toolkit.lib.appservice.service.IWebAppBase in project azure-tools-for-java by Microsoft.

the class WebAppRunState method executeSteps.

@Nullable
@Override
@AzureOperation(name = "webapp.deploy_artifact", params = { "this.webAppConfiguration.getWebAppName()" }, type = AzureOperation.Type.ACTION)
public IAppService executeSteps(@NotNull RunProcessHandler processHandler, @NotNull Operation operation) throws Exception {
    File file = new File(getTargetPath());
    if (!file.exists()) {
        throw new FileNotFoundException(message("webapp.deploy.error.noTargetFile", file.getAbsolutePath()));
    }
    webAppConfiguration.setTargetName(file.getName());
    final IWebAppBase deployTarget = getOrCreateDeployTargetFromAppSettingModel(processHandler);
    updateApplicationSettings(deployTarget, processHandler);
    AzureWebAppMvpModel.getInstance().deployArtifactsToWebApp(deployTarget, file, webAppSettingModel.isDeployToRoot(), processHandler);
    return deployTarget;
}
Also used : FileNotFoundException(java.io.FileNotFoundException) IWebAppBase(com.microsoft.azure.toolkit.lib.appservice.service.IWebAppBase) File(java.io.File) AzureOperation(com.microsoft.azure.toolkit.lib.common.operation.AzureOperation) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

IWebAppBase (com.microsoft.azure.toolkit.lib.appservice.service.IWebAppBase)1 AzureOperation (com.microsoft.azure.toolkit.lib.common.operation.AzureOperation)1 File (java.io.File)1 FileNotFoundException (java.io.FileNotFoundException)1 Nullable (org.jetbrains.annotations.Nullable)1