Setting Up Jenkins
This page describes how users can host RISC-V CI via Jenkins. For hosting CI through Jenkins, follow the steps described below.
Installing Jenkins
Jenkins install instructions are given at this link.
If you wish to build Jenkins from source, the repository is available at https://github.com/jenkinsci/jenkins
Adding RISC-V agents in Jenkins
Agents are the compute instances in Jenkins on which CI builds are run. Once Jenkins is installed, the next step is to add RISC-V agents in Jenkins. They are also referred to as slaves, build executors, or runners.
Make sure that Jenkins Master (the compute instance on which Jenkins web server is running) is accessible by the RISC-V compute instance you wish to add as a slave.
For the sake of simplicity, it is assumed that RISC-V compute instances have Linux operating system installed on them (preferably Ubuntu) and are accessible through SSH
Install prerequisites
Compute instances need OpenJDK 17 or newer installed on them to be hosted on Jenkins.
sudo apt install openjdk-17-jdk
Set up agent in Jenkins
In the Jenkins web server, go to
Build Executor Status > New Node
Add a Node name (this will be displayed in the build executor list) and select Permanent Agent
Add a suitable description for users who will be using that compute instance
Add the number of executors (this indicates how many builds can run concurrently)
Change
Launch method
toLaunch agents via SSH
since our agent is accessible via SSHIn
Host
, add the IP or URL which can be used to access the compute instanceIn
Credentials
, click onAdd
if you have not created the credentials yet and add the credentialsKind
asUsername with password
(these are the credentials which you can use to SSH to your RISC-V compute instance)In
Host Key Verification Strategy
, selectManually trusted key Verification strategy
and also checkRequire manual verification of initial connection
If you access the RISC-V compute instance through a port other than 22, click on
Advanced
and enterPort
Leave other settings as is and click save
Once the settings are saved, you will see Trust SSH Host Key
on the left bar. Click on it and grant permission to use the compute instance to the Jenkins controller.
Now the Jenkins agent is added and can be used. For using Jenkins as mentioned above instance, use the name which you gave it at the start in your build pipelines of Jenkins.