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.
name: deploy to Azure cloud
- mvn clean compile package
- pipe: microsoft/azure-web-apps-deploy:1.0.1
Now when I push my code to bitbucket, it sends the app.jar to azure. But it is in exploded (unzipped) version in the D:\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"?>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar "%HOME%\site\wwwroot\app.jar"">
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.
When you deploy the zip file, you’re engaging Kudu’s deployment mechanism, which will add the files in the .jar to the site/wwwroot folder of your site in App Service. For more information on Kudu, see the Kudu wiki https://github.com/projectkudu/kudu/wiki. There are some resources there including contacts and some paths to follow such as https://github.com/projectkudu/kudu/wiki. You could also look at the azure-cli-run pipe to do some bespoke tasks.
The problem is, it is not adding the .jar to /wwwroot folder. It is adding the unzip folders of the jar, to the /wwwroot. So my question is, are there any parameters or configuration in the bitbucket-pipelines.yml to instruct Kudu, to not to unzip the jar? Thanks for your help
Hi Shehan. I understand where you are coming from. Im no Kudu expert.. hence the link to the Kudu team.. The documentation from the web app deploy is here. there isnt anything there that seems to suggest not unpacking. Hence my thoughts on CLI or post action. Try the Kudu wiki for some ideas? I guess you could put the jar in a zip file if thats what you need?
Hi, if you don't want to unzip the file, you may try Run From Package by setting WEBSITE_RUN_FROM_PACKAGE=1 in your Azure Web App and then do the Zip Deploy. More information can be found here: Run your Azure Functions from a package file. It also applies to Web Apps as they explain here: Announcing zipdeploy integration with Run From Package.
Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their Jira Cloud instance. ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events