Class DeployMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.microsoft.azure.maven.AbstractAzureMojo
-
- com.microsoft.azure.maven.appservice.AbstractAppServiceMojo
-
- com.microsoft.azure.maven.function.AbstractFunctionMojo
-
- com.microsoft.azure.maven.function.DeployMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="deploy", defaultPhase=DEPLOY) public class DeployMojo extends AbstractFunctionMojoDeploy your project to target Azure Functions. If target Function App doesn't exist, it will be created.
-
-
Field Summary
-
Fields inherited from class com.microsoft.azure.maven.function.AbstractFunctionMojo
appInsightsInstance, appInsightsKey, disableAppInsights, finalName, outputDirectory, parser, pricingTier, region, runtime, skip, TRIGGER_TYPE
-
Fields inherited from class com.microsoft.azure.maven.appservice.AbstractAppServiceMojo
appName, appServiceClient, appServicePlanName, appServicePlanResourceGroup, appSettings, deploymentSlotSetting, MAVEN_PLUGIN_POSTFIX, resourceGroup
-
Fields inherited from class com.microsoft.azure.maven.AbstractAzureMojo
allowTelemetry, auth, authType, buildDirectory, failsOnError, INSTALLATION_ID_KEY, mavenResourcesFiltering, plugin, PLUGIN_NAME_KEY, PLUGIN_VERSION_KEY, project, session, SESSION_ID_KEY, settings, settingsDecrypter, SUBSCRIPTION_ID_KEY, SUBSCRIPTION_NOT_FOUND, SUBSCRIPTION_TEMPLATE, subscriptionId, telemetries, telemetryProxy, USING_AZURE_ENVIRONMENT
-
-
Constructor Summary
Constructors Constructor Description DeployMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private com.microsoft.azure.toolkit.lib.appservice.config.AppServiceConfigbuildDefaultConfig(String subscriptionId, String resourceGroup, String appName)protected com.microsoft.azure.toolkit.lib.appservice.function.FunctionAppBase<?,?,?>createOrUpdateResource(com.microsoft.azure.toolkit.lib.appservice.config.FunctionAppConfig config)private voiddeployArtifact(com.microsoft.azure.toolkit.lib.appservice.function.FunctionAppBase<?,?,?> target)protected voiddoExecute()protected voiddoValidate()private FilegetArtifactToDeploy()private voidvalidateApplicationInsightsConfiguration()protected voidvalidateArtifactCompileVersion()protected voidvalidateParameters()Deprecated.-
Methods inherited from class com.microsoft.azure.maven.function.AbstractFunctionMojo
getAppInsightsInstance, getAppInsightsKey, getFinalName, getRegion, getRuntimeConfiguration, getTelemetryProperties, isDisableAppInsights, isSkipMojo, validateAppName
-
Methods inherited from class com.microsoft.azure.maven.appservice.AbstractAppServiceMojo
getAppName, getAppServicePlanName, getAppServicePlanResourceGroup, getAppSettings, getDeploymentSlotSetting, getDeploymentStagingDirectoryPath, getResourceGroup, getResources, initAzureAppServiceClient, printCurrentSubscription
-
Methods inherited from class com.microsoft.azure.maven.AbstractAzureMojo
afterMojoExecution, beforeMojoExecution, checkSubscription, execute, executeWithTimeRecorder, getActualAuthType, getBuildDirectoryAbsolutePath, getInstallationId, getMavenResourcesFiltering, getPluginName, getPluginVersion, getProject, getSession, getSessionId, getSettings, getSubscriptionId, getTargetSubscriptionId, getTelemetries, getTelemetryProxy, getUserAgent, highlightDefaultValue, infoWithMultipleLines, initTelemetryProxy, isAllowTelemetry, isFailsOnError, loginAzure, loginAzure, onMojoError, onSkipped, printCredentialDescription, selectSubscription, selectSubscription, trackMojoFailure, updateTelemetryProperties
-
-
-
-
Field Detail
-
APPLICATION_INSIGHTS_CONFIGURATION_CONFLICT
private static final String APPLICATION_INSIGHTS_CONFIGURATION_CONFLICT
- See Also:
- Constant Field Values
-
ARTIFACT_INCOMPATIBLE_WARNING
private static final String ARTIFACT_INCOMPATIBLE_WARNING
- See Also:
- Constant Field Values
-
ARTIFACT_INCOMPATIBLE_ERROR
private static final String ARTIFACT_INCOMPATIBLE_ERROR
- See Also:
- Constant Field Values
-
NO_ARTIFACT_FOUNDED
private static final String NO_ARTIFACT_FOUNDED
- See Also:
- Constant Field Values
-
APP_NAME_PATTERN
private static final String APP_NAME_PATTERN
- See Also:
- Constant Field Values
-
RESOURCE_GROUP_PATTERN
private static final String RESOURCE_GROUP_PATTERN
- See Also:
- Constant Field Values
-
SLOT_NAME_PATTERN
private static final String SLOT_NAME_PATTERN
- See Also:
- Constant Field Values
-
APP_SERVICE_PLAN_NAME_PATTERN
private static final String APP_SERVICE_PLAN_NAME_PATTERN
- See Also:
- Constant Field Values
-
EMPTY_APP_NAME
private static final String EMPTY_APP_NAME
- See Also:
- Constant Field Values
-
INVALID_APP_NAME
private static final String INVALID_APP_NAME
- See Also:
- Constant Field Values
-
EMPTY_RESOURCE_GROUP
private static final String EMPTY_RESOURCE_GROUP
- See Also:
- Constant Field Values
-
INVALID_RESOURCE_GROUP_NAME
private static final String INVALID_RESOURCE_GROUP_NAME
- See Also:
- Constant Field Values
-
INVALID_SERVICE_PLAN_NAME
private static final String INVALID_SERVICE_PLAN_NAME
- See Also:
- Constant Field Values
-
INVALID_SERVICE_PLAN_RESOURCE_GROUP_NAME
private static final String INVALID_SERVICE_PLAN_RESOURCE_GROUP_NAME
- See Also:
- Constant Field Values
-
EMPTY_SLOT_NAME
private static final String EMPTY_SLOT_NAME
- See Also:
- Constant Field Values
-
INVALID_SLOT_NAME
private static final String INVALID_SLOT_NAME
- See Also:
- Constant Field Values
-
EMPTY_IMAGE_NAME
private static final String EMPTY_IMAGE_NAME
- See Also:
- Constant Field Values
-
INVALID_OS
private static final String INVALID_OS
- See Also:
- Constant Field Values
-
EXPANDABLE_PRICING_TIER_WARNING
private static final String EXPANDABLE_PRICING_TIER_WARNING
- See Also:
- Constant Field Values
-
EXPANDABLE_REGION_WARNING
private static final String EXPANDABLE_REGION_WARNING
- See Also:
- Constant Field Values
-
EXPANDABLE_JAVA_VERSION_WARNING
private static final String EXPANDABLE_JAVA_VERSION_WARNING
- See Also:
- Constant Field Values
-
deploymentType
@Parameter(property="deploymentType") protected String deploymentType
The deployment approach to use, valid values are FTP, ZIP, MSDEPLOY, RUN_FROM_ZIP, RUN_FROM_BLOBFor Windows Function Apps, the default deployment method is RUN_FROM_ZIP
For Linux Function Apps, RUN_FROM_BLOB will be used for apps with Consumption and Premium App Service Plan, RUN_FROM_ZIP will be used for apps with Dedicated App Service Plan.
- Since:
- 0.1.0
-
-
Method Detail
-
doExecute
protected void doExecute() throws Throwable- Specified by:
doExecutein classcom.microsoft.azure.maven.AbstractAzureMojo- Throws:
Throwable
-
doValidate
protected void doValidate() throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException- Throws:
com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
-
validateParameters
@Deprecated protected void validateParameters()
Deprecated.
-
createOrUpdateResource
protected com.microsoft.azure.toolkit.lib.appservice.function.FunctionAppBase<?,?,?> createOrUpdateResource(com.microsoft.azure.toolkit.lib.appservice.config.FunctionAppConfig config) throws Throwable- Throws:
Throwable
-
buildDefaultConfig
private com.microsoft.azure.toolkit.lib.appservice.config.AppServiceConfig buildDefaultConfig(String subscriptionId, String resourceGroup, String appName)
-
deployArtifact
private void deployArtifact(com.microsoft.azure.toolkit.lib.appservice.function.FunctionAppBase<?,?,?> target)
-
validateArtifactCompileVersion
protected void validateArtifactCompileVersion() throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException- Throws:
com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
-
getArtifactToDeploy
private File getArtifactToDeploy() throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
- Throws:
com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
-
validateApplicationInsightsConfiguration
private void validateApplicationInsightsConfiguration() throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException- Throws:
com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
-
-