de2204ee8f | ||
---|---|---|
.. | ||
src/main | ||
CHANGELOG.md | ||
README.md | ||
build.gradle | ||
gradle.properties | ||
settings.gradle |
README.md
Azure WebApp Plugin for Gradle
This plugin helps Java developers to deploy Maven projects to Azure App Service.
Prerequisites
Tool | Required Version |
---|---|
JDK | 1.8 |
Gradle | 5.2 and above |
Setup
In your Gradle Java project, add the plugin to your build.gradle
:
plugins {
id "com.microsoft.azure.azurewebapp" version "1.0.0"
}
Configuration
Here is a sample configuration, for details, please refer to this document.
Groovy DSL
azurewebapp {
subscription = '<your subscription id>'
resourceGroup = '<your resource group>'
appName = '<your app name>'
pricingTier = '<price tier like 'P1v2'>'
region = '<region like 'westus'>'
runtime {
os = 'Linux'
webContainer = 'Tomcat 9.0' // or 'Java SE' if you want to run an executable jar
javaVersion = 'Java 8'
}
appSettings {
<key> = <value>
}
auth {
type = 'azure_cli' // support azure_cli, oauth2, device_code and service_principal
}
}
Kotlin DSL
azurewebapp {
subscription = "<your subscription id>"
resourceGroup = "<your resource group>"
appName = "<your app name>"
pricingTier = "<price tier like 'P1v2'>"
region = "<region like 'westus'>"
setRuntime(closureOf<com.microsoft.azure.gradle.configuration.GradleRuntimeConfig> {
os("Linux")
webContainer("Java SE")
javaVersion("Java 11")
})
setAppSettings(closureOf<MutableMap<String, String>> {
put("key", "value")
})
setAuth(closureOf<com.microsoft.azure.gradle.auth.GradleAuthConfig> {
type = "azure_cli"
})
}
Usage
Deploy your web project to Azure App Service
gradle azureWebAppDeploy
Feedback and Questions
To report bugs or request new features, file issues on Issues. Or, ask questions on Stack Overflow with tag azure-java-tools.
Data and Telemetry
This project collects usage data and sends it to Microsoft to help improve our products and services.
Read Microsoft's privacy statement to learn more.
If you would like to opt out of sending telemetry data to Microsoft, you can set allowTelemetry
to false in the plugin configuration.
Please read our document to find more details about allowTelemetry.