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
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

175 views 4 1
Join discussion

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