Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to deploy war to tomcat server using bitbucket pipeline?

Immanuel Aristya July 29, 2018

How to deploy war to tomcat server using bitbucket pipeline? Please explain step by step 

Thanks

2 answers

0 votes
Radek Antoniuk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 23, 2019
0 votes
Graham Gatus
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 30, 2018

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: 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.

Chip Anderson December 28, 2018

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!

Like # people like this
tecquilka March 13, 2019

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 :-)

jcaballes October 29, 2020

Hi , 

I would like to know if there are updates on this ? did you successfully push war file to tomcat ?Thank you 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events