I want to deploy my spring boot project to Azure app service. I setup the bitbucket side as per the document. I have the bitbucket-pipelines.yml step as follows.
- step:
name: deploy to Azure cloud
image: maven:3.5.2
trigger: manual
deployment: production
script:
- mvn clean compile package
- pipe: microsoft/azure-web-apps-deploy:1.0.1
variables:
AZURE_APP_ID: xxxxxxxxxxxxxxxxxx
AZURE_PASSWORD: xxxxxxxxxxxxxxxxx
AZURE_TENANT_ID: xxxxxxxxxxxxxxxx
AZURE_RESOURCE_GROUP: 'xxxxxxxxxxxx'
AZURE_APP_NAME: 'xxxxxxxx'
ZIP_FILE: 'app.jar'
Now when I push my code to bitbucket, it sends the app.jar to azure. But it is in exploded (unzipped) version in the
\home\site\wwwroot> directory of the azure container. So I see all my updated code in the wwwroot, but not in a jar file. Basically the jar file is unzipped in to directories (BOOT-INF,META-INF, org etc). But my web.config is looking for the app.jar file to execute the spring boot app. This is how web.config look like.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="%JAVA_HOME%\bin\java.exe"
arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar "%HOME%\site\wwwroot\app.jar"">
</httpPlatform>
</system.webServer>
</configuration>
so how can I get the app.jar file in the wwwroot directory of azure container? I can manually create the app.jar using the unzipped (exploded) folders. But it is too much manual process then. Else I should be able to modify the web.config file to run the unzipped version of my spring boot app. I really need help for this. Thank you.