简体   繁体   中英

VSTS to Azure Tomcat 8 Web App deployment

How do you deploy a war file using a VSTS Release to an Azure Web App running Tomcat? I have a CI/CD pipeline working in VSTS setup to build when code is committed, and then Release and push the new war file to Azure when the build completes. Problem is, the war file is deployed to \\site\\wwwroot\\webapps instead of \\site\\wwwroot\\bin\\apache-tomcat-8.5.24\\webapps where it needs to go to be pulled in as an app into Tomcat.

I have tried setting up a Virtual Application in Azure and referencing that in the Deployment Task however I am not getting the behavior I need. Playing with the Virtual Application options I have been able to affect the name of the delivered war file (not a goal of mine) and the sub-directory where the file is delivered although not the webapps dir under the Tomcat dir. Which options am I missing?

You can upload/copy files through Kudu API.

Refer to this thread for the details of how to call Kudu API during build/release:

How to access Kudu in Azure using power shell script

BTW, by default, the war file should be in site\\wwwroot\\webapps. Using Custom Tomcat Configuration in Azure App Services(Windows)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM