How to deploy war to tomcat server using bitbucket pipeline? Please explain step by step
Thanks
Hi @Immanuel Aristya
Are you trying to start and deploy a webapp to Tomcat running locally as part of your pipeline, or are you trying to deploy your webapp to a remote Tomcat instance?
If you are trying to build a webapp and deploy to a remote Tomcat instance, a simplified pipeline may look something like:
pipelines: default: step: name: Buildscript: # Run the build script with tests. - ./build-and-test-my-app.shartifacts: - target/my-web-app.jarstep: name: Deployscript: # Run deployment script - ./deploy-my-app.sh
For more complicated Continuous Delivery workflows, pipelines offers a deployments feature: https://confluence.atlassian.com/bitbucket/bitbucket-deployments-940695276.html
Deployments would allow you to track the deployment of you application through 'test', 'staging' and 'production' environments, where you specify the commands required to deploy to each environment.
OK, sorry but this answer is worse than useless. It looks like an answer, but it isn't. WHAT GOES IN THE DEPLOY .sh SCRIPT?!?!?!
This kind of non-answer is sprinkled everywhere throughout the Pipeline/Deployments documentation and Community answers. I was THRILLED when Pipeline easily built my Maven project's WAR file with a single click. I am FRUSTRATED that there is no useful documentation about how to push that WAR file to an actual Tomcat/Glassfish server.
Maybe even start with something simpler - What environment are these scripts running in? Bash? Powershell? Some custom environment? The docs do not say!
Hi,
I'd like to know answer as well.
In confluence there is pretty easy way by putting .war into ${basedir}/webapp , but I don't know exact equivalent in BitBucket.
Please don't suggest anything like loading my code by modify startup-arguments etc. That kind of approach is littlebit hacky.
Btw show content of Deploy-my-app code would help :-)
This is a duplicate question, see e.g. https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-pipelines-does-not-finish-deploy-war-to-tomcat/qaq-p/1028113
Hi ,
I would like to know if there are updates on this ? did you successfully push war file to tomcat ?Thank you
It looks like you're new here. Sign in or register to get started.