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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to deploy war to tomcat server using bitbucket pipeline?

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


2 answers

0 votes
Graham Gatus Atlassian Team Aug 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:

name: Build
# Run the build script with tests.
- ./
- target/my-web-app.jar
name: Deploy
# Run deployment script
- ./

For more complicated Continuous Delivery workflows, pipelines offers a deployments feature:

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!

Like # people like this


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

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
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,845 views 10 16
Read article

Community Events

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

Events near you