Jenkins & node.js | Part 1
Jenkins is a continuous integration tool. It is leading open source automation server, Jenkins also provides hundreds of plugins to support building, deploying and automating any project.
Here we are going to discuss only about setting up jenkins inUbuntu 14.04 . In PART 2 we will discuss about creating up a free style project for node.js project.
- Your remote server or VM should have java installed, if not follow the below steps, to install Oracle Java-8 or refer here:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
Once installed, now your system can run jenkins server.
2. Before we can install Jenkins, we have to add the key and source list to apt. This is done in 2 steps, first we’ll add the key. Secondly, we’ll create a sources list for Jenkins, as show below.
Add LTS Version PPA
$ wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | sudo apt-key add -
$ sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
Add Latest Version PPA
$ wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
$ sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
There are 2 versions of jenkins, one is LTS release provides long-term support and other provides latest version.
3. Now, we only have to update apt’s cache and install jenkins
apt-get install jenkins
After installation Jenkins runs as a service in PORT:8080 by default you can change it. Edit the file under `/etc/default/jenkins` update HTTP_PORT
Restart the jenkins service. `$ sudo service jenkins restart`
Jenkins can now be accessed at: `http://remote_server_url:8081`
or in localhost if it’s local system `http://localhost:8081`