From 5e51d1232587b6e6345e6e61c49265657fef8e5b Mon Sep 17 00:00:00 2001 From: lenala Date: Mon, 1 Oct 2018 14:54:13 -0700 Subject: [PATCH 1/2] Updating AzureWebApp task to latest plugin version configuration format --- build.gradle | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 6afd2543..b7272ca4 100644 --- a/build.gradle +++ b/build.gradle @@ -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 = "" + } + + deployment = { + type = "war" +// if 'warFile' is not specified, default output of the 'war' plugin will be used +// warFile = '' + contextPath = 'todoapp' + } } From dc78ec2939f9a57aae46007e5f4a0b630f5829e5 Mon Sep 17 00:00:00 2001 From: lenala Date: Mon, 8 Oct 2018 08:26:20 -0700 Subject: [PATCH 2/2] Addressing code review --- README.md | 20 +++++++------------- build.gradle | 2 +- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index cc6d2afe..3fcdbb6c 100644 --- a/README.md +++ b/README.md @@ -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 repository + - 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 @@ -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 diff --git a/build.gradle b/build.gradle index b7272ca4..885c36a7 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { repositories { jcenter() maven { - url uri('/Users/farlen/.m2/repository') + url uri('') } } dependencies {