Installing Node.js and npm
First things first, for our build, we need Node.js and npm (again) at the very least. Like on Windows, we can install Node.js and get npm as a bonus. We must install them on our CI server. Unlike Jenkins, Node.js has an install package in apt-get
. Unfortunately, this is an old version and we want to use the latest LTS version. So again, we are going to run some arcane Linux commands:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install -y nodejs
The L
switch (from -L
) in curl tells it to redo the request if the response returns that the requested page has moved. We know the pipe character; it gives the output of the left side of the pipe's input to the right side of the pipe. sudo -E bash -
will run the bash command as the root user (super user). -E
means that any environment variables will be kept. The last -
means that the standard output is given as a command to bash. Simply said, we are using curl to download some script that we...