use of com.microsoft.azure.toolkit.lib.appservice.service.IFunctionApp in project azure-tools-for-java by Microsoft.
the class FunctionDeploymentState method executeSteps.
@Nullable
@Override
@AzureOperation(name = "function.deploy.state", type = AzureOperation.Type.ACTION)
public IFunctionApp executeSteps(@NotNull RunProcessHandler processHandler, @NotNull Operation operation) throws IOException {
final FunctionDeploymentMessenger messenger = new FunctionDeploymentMessenger(processHandler);
AzureMessager.getContext().setMessager(messenger);
final IFunctionApp functionApp;
if (StringUtils.isEmpty(functionDeployConfiguration.getFunctionId())) {
functionApp = createFunctionApp(processHandler);
} else {
functionApp = Azure.az(AzureAppService.class).subscription(functionDeployConfiguration.getSubscriptionId()).functionApp(functionDeployConfiguration.getFunctionId());
updateApplicationSettings(functionApp);
}
stagingFolder = FunctionUtils.getTempStagingFolder();
prepareStagingFolder(stagingFolder, processHandler, operation);
// deploy function to Azure
FunctionAppService.getInstance().deployFunctionApp(functionApp, stagingFolder);
// list triggers after deployment
listHTTPTriggerUrls(functionApp);
operation.trackProperties(AzureTelemetry.getActionContext().getProperties());
return functionApp;
}
Aggregations