How to run a Node.js build using Bamboo OnDemand

I have a Node.js build that uses grunt. I created a plan with a task that has a requirement for Node 0.10. (This requirement caused Bamboo to exclude Windows machines as agent candidates.)

Unfortunately, when the build runs, it cannot find npm. When I SSH into the elastic instance and try to run just "node", it is not found.

1 answer

1 vote

What about npm, can it find it? What if you type 'nodejs' instead of 'node'?

You can install missing packages or symlink existing binaries using instance setup script found on image configuration page.

It's not finding npm or nodejs... I'll take a look at the image configuration page

Ok, I'm back trying to get this working. I don't see where on the Image Configuration page I can do what you are suggesting.

I've also tried to get an Ubuntu instance running, because that's what we're using for development. Unfortunately that seems to just hang when it's trying to create the Elastic Agent. (I was thinking that if I could get Ubuntu running, I could execute an install script that put node and npm on the machine.)

Any suggestions would be welcome... I think I'm trying to do the simplest possible thing with Node, so surprised it's not working.

Looks like Node is not installed by default on Bamboo images.

I was able to add

apt-get update
apt-get install -y python-software-properties python g++ make
add-apt-repository -y ppa:chris-lea/node.js
apt-get update
apt-get install -y nodejs
apt-get install -y npm

to the 'Instance Startup Script' section of the 'Image Configuration' settings in Bamboo. That brought in the latest version of Node (0.10.xx).

Node is in /opt/node-0.10 IIRC.

There will be a new, fixed Ubuntu image today or tomorrow. It will also carry a brand new node.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,561 views 0 6
Read article

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