How to deploy war to tomcat server using bitbucket pipeline? Please explain step by step
Thanks
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
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: Build
script:
# Run the build script with tests.
- ./build-and-test-my-app.sh
artifacts:
- target/my-web-app.jar
step:
name: Deploy
script:
# 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I would like to know if there are updates on this ? did you successfully push war file to tomcat ?Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.