Update the APT packages lists
sudo apt-get update
Install the Oracle Java SDK
sudo apt-get install oracle-java8-jdk
Download the key for the repository
get -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
Add the Jenkins repository to the APT sources (using the Stable LTS version for Debian)
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
Update the APT packages list
sudo apt-get update
Install Jenkins
sudo apt-get install jenkins
Based on https://raspberrytips.com/install-jenkins-raspberry-pi/