0
votes

I recently tried to setup GIT continuous deployment for a Java WebApp (https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/).

I've uploaded my war archive into a separate branch on my GIT repository (see https://gist.github.com/koraktor/85964), setup the fetch keys and run it.

As you may see here - https://azure.microsoft.com/en-us/documentation/articles/web-sites-java-add-app/ all Java WebApps have a 'webapps' folder beneath 'wwwroot' folder.

Git continous deployment will copy all files under 'wwwroot' folder, hence, Java WebApps cannot be continuously deployed. The files need to be copied under 'webapps' folder.

Is there anything that I'm missing here? Or actually is not possible to continuously deploy a Java WebApp using Git?

1

1 Answers

0
votes

Found a relatively simple solution - http://blogs.msdn.com/b/azureossds/archive/2015/12/11/use-custom-context-for-azure-tomcat-application.aspx

<environmentVariable name="JAVA_OPTS" value="-Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -Xms512m -Xmx8192m -XX:MaxPermSize=256m" />

There is a small problem with this approach, when you want to create a deployment slot (see https://azure.microsoft.com/en-us/documentation/articles/web-sites-staged-publishing/) . That deployment slot is a brand new WebApp that only clones the settings not the files in the main WebApp (not the custom Tomcat that you just deployed). Hence, you will have to copy it over (which is a little bit error-prone).

Usually deployment slots, should be as similar to production slots as possible.