Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Can Bamboo cache npm node_modules to speed up builds?

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

thanks

Chris

 

Atlassian support- Bamboo 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center - Early Access Program

G’day Bamboo customers, The wait is almost over! We are in the final stages of work on the first release of Bamboo Data Center, our self-managed enterprise offering of Bamboo. This Data Center offe...

1,003 views 0 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