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,
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" ? https://answers.atlassian.com/questions/39230190
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: https://answers.atlassian.com/questions/39140980
If you have any more questions, it would help if you can share the bitbucket-pipelines.yml file you are using.
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,
pipelines: default: - step: script: - curl -o meteor_install_script.sh https://install.meteor.com/ - chmod +x meteor_install_script.sh - sed -i "s/type sudo >\/dev\/null 2>&1/\ false /g" meteor_install_script.sh - ./meteor_install_script.sh - 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"
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.
We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...
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