Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Updating AzureWebApp task to latest gradle plugin version configuration format #68

Open
wants to merge 2 commits into
base: tomcat-on-azure-app-service-linux-gradle
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ the system environment variable
TOMCAT_HOME=put-your-tomcat-home-here
```

In build.gradle provide following values:
```
<path_to_local_maven_repo> - path to local maven repository
<path_to_auth_file> - path to file containing authentication information
```
For more information see [how to create auth file](https://github.com/Azure/azure-libraries-for-java/blob/master/AUTH.md).

## Build Todo List Web App - WAR

```bash
Expand Down Expand Up @@ -117,19 +124,6 @@ again without restarting Tomcat.
gradle azureWebappDeploy
```

TODO: show how to deploy multiple applications.

### Temporary Step - until it is fixed on the App Service service-side

1. Go the Web App on Linux in the Azure Portal
2. Click on Development Tools / SSH
3. Click on Go --> to the app's SSH Shell

```bash
cd /home/site/wwwroot/webapps/ROOT
rm index.jsp
```

### Open the todo list Web app

Open it in a browser
Expand Down
37 changes: 24 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
repositories {
jcenter()
maven {
url uri('/Users/farlen/.m2/repository')
url uri('<path_to_local_maven_repo>')
}
}
dependencies {
Expand Down Expand Up @@ -47,22 +47,33 @@ cargo {
}
}

azurewebapp {
deploymentType = 'wardeploy'
azureWebApp {
resourceGroup = "${System.env.WEBAPP_RESOURCE_GROUP}"
appName = "${System.env.WEBAPP_NAME}"
pricingTier = "S2"
authFile = file('/Users/farlen/stuff/my2.azureauth')
// if 'target' is not specified, dafault output of the 'war' plugin will be used
// target = file('C:/stuff/azure-gradle-plugins.4/samples/todo-app-java-on-azure.appservice-on-linux/build/libs/todoapp.war')
appServiceOnLinux = {
region = "southcentralus"

appService = {
type = 'linux'
runtimeStack = 'TOMCAT 9.0-jre8'
// urlPath = 'todoapp'
}
// appServiceOnWindows = {
// javaWebContainer = "tomcat 8.5"
// javaVersion = "1.8.0_102"
// urlPath = 'todoapp'
// }

/* appService = {
type = 'windows'
javaWebContainer = "tomcat 8.5"
javaVersion = "1.8.0_102"
}*/

authentication = {
type = "file"
file = "<path_to_auth_file>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add in readme or any other instruction to let user know this field need change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thank you.

}

deployment = {
type = "war"
// if 'warFile' is not specified, default output of the 'war' plugin will be used
// warFile = '<path_to_war_file>'
contextPath = 'todoapp'
}
}