Build meteor app in bitbucket pipelines.



I'm trying to use the Bitbucket pipelines for automated testing on commit. I now install meteor, change the locale (because MongoDB was reporting a problem with it), and then try to run my tests. I have got it to work, but it takes up to 12 minutes for the application to completely build. Is there any way to make this go faster? If I run the same test command on my laptop it only takes 30 seconds to finish.


Thanks in advance,



1 answer

Hi @Michael Claes, 

To better understand what is taking a long time, what are you doing in the command? I am not very familiar with meteor either. Are you downloading or installing things as part of that command? If you follow this answer, does it also take 12 minutes locally if you do it within the default docker image (pipelines uses "atlassian/default-image" ?

To speed up your build, I would suggest choosing an image that has the capabilities already installed. You can also create your own using the following guide:

If you have any more questions, it would help if you can share the bitbucket-pipelines.yml file you are using.

Cheers, Sigge

Hi @Sigge Birgisson,


First of all thank you for trying to help me. I've tried running it locally and got a time of 8 minutes when I run the bitbucket-pipelines.yml commands the first time. If I then simply try and run the test command again, I get a time of 50 seconds. From this I take that most of the time is spent on downloading meteor, getting the required packages, and then building it for the first time.

Can I prevent having to do this every time using a docker image? I have no experience with docker so I'm not really sure how it works.

The bitbucket-pipelines.yml file is added below. It downloads and installs meteor, then fixes some locale stuff that makes mongoDB throw an error, and then runs the self-declared npm test script. The script can also be found below.


Thanks in advance,


    - step:
          - curl -o
          - chmod +x
          - sed -i "s/type sudo >\/dev\/null 2>&1/\ false /g"
          - ./
          - export PATH=$PATH:~/.meteor/
          - meteor --version
          - cd app
          - locale-gen en_US.UTF-8
          - export LC_ALL=en_US.UTF-8
          - meteor npm test
"test": "meteor test --once --driver-package dispatch:mocha-phantomjs --settings ../config/local/settings.json"

would meteord image work I wonder?

meteord doesn't work with the way our files are laid out.The root of the repo where the script should run is not inside our meteor app yet, so when it calls meteor build it errors. I've tried forking and changing it. After rebuilding the docker image I tried running it through the pipeline, but it told me meteor wasn't installed on the image.

After this I've tried making my own docker image with meteor installed on it. But it takes 8 minutes just to get the image, so this is even worse than the 3 minutes to start from the default image and just download and install meteor.

Managed to build a docker image with meteor installed on it that starts executing the test after 1min30sec instead of the 3min it takes for meteor to be installed on the default image. So that's an improvement. But making the meteor build seems to have gotten slower so the total run duration is 14 minutes now.


Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Posted Thursday in Off-topic

Friday Fun: What's your favourite beer/drink

As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...

294 views 38 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot