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:
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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.