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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Can Bamboo cache npm node_modules to speed up builds?

Deleted user Nov 08, 2018

I'm trying to figure out how to speed up Bamboo builds that involve npm. From the logs, I can see that `npm install` takes roughly 8 minutes...

simple	08-Nov-2018 08:00:30	Starting task 'Install' of type 'com.atlassian.bamboo.plugins.bamboo-nodejs-plugin:task.builder.npm'
command 08-Nov-2018 08:00:30 Beginning to execute external process for build '...'\n ... running command line: \n/usr/bin/node /usr/bin/npm install\n ...
simple 08-Nov-2018 08:07:50 Finished task 'Install' with result: Success

Is Bamboo caching the `node_modules` directory after `npm install`? Is it possible to have Bamboo cache `node_modules` across multiple builds?

This is what job configuration looks like:

Screen Shot 2018-11-08 at 10.11.06 AM.png

1 answer

1 vote
Chris Berry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 08, 2018

Hi Hristo,

If you specify a Node install task it will always  reinstall the files.

If you do not clean the build directory before and after the job then you could use a ScriptTask instead. The below would only run the install if the node_module directory doesn't already exist.

[ ! -d "node_modules" ] && npm install

You would need to have an additional ScriptTask to perform any necessary cleaning.




Atlassian support- Bamboo 

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events