use of com.azure.resourcemanager.appservice.models.PublishingProfile in project azure-maven-plugins by microsoft.
the class FTPFunctionDeployHandler method deploy.
@Override
public void deploy(final File file, final WebAppBase webAppBase) {
final FTPUploader uploader = new FTPUploader();
final PublishingProfile profile = webAppBase.getPublishingProfile();
final String serverUrl = profile.ftpUrl().split("/", 2)[0];
try {
uploader.uploadDirectoryWithRetries(serverUrl, profile.ftpUsername(), profile.ftpPassword(), file.getAbsolutePath(), DEFAULT_WEBAPP_ROOT, DEFAULT_MAX_RETRY_TIMES);
} catch (AzureExecutionException e) {
throw new AzureToolkitRuntimeException("Failed to upload artifact to azure", e);
}
if (webAppBase instanceof FunctionApp) {
((FunctionApp) webAppBase).syncTriggers();
}
AzureMessager.getMessager().info(String.format(DEPLOY_FINISH, webAppBase.defaultHostname()));
}
Aggregations