Snippets Raspberry / Applications / Jenkins on Pi

Jenkins on Pi

By Marcelo Fernandes Jul 11, 2017

Continuous Integration with Jenkins on Raspberry Pi

Jenkins is an open source automation server intended to automate repetitive technical tasks involved in the continuous integration and delivery of software.

Step 1: Get the latest versions from the repository

# Add the repository key to the system.
wget -q -O - | sudo apt-key add -
# Append the Debian package repository address to the server's sources.list
echo deb binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list
# we run update
sudo apt-get update
# Finally install!
sudo apt-get install jenkins

Step 2: Starting Jenkins

# Start via systemctl
sudo systemctl start jenkins
# Look the status
sudo systemctl status jenkins

[Optional] Step 3: Opening the Firewall

# By default jenkins runs on 8080, therefore:
sudo ufw allow 8080
# Check the new rules
sudo ufw status

Step 4: Setting Up Jenkins:

Visit the address http://ip_address_or_domain_name:8080, you should see the unlock jenkins screen which will require from you the initial password, which can be seen at:

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

After that you should see a new screen for Jenkins Customization, and Admin User creation, use as you wish. :)


You can change the default port of jenkins in case the port :8080 is already beeing used:

sudo nano /etc/init.d/jenkins

Search for the line 'DAEMON_ARGS...' and below this line
specify  your port in the following way:




Link 1