Building with Jenkins
Jenkins is a software package written in Java, that manages package builds automaticly. How Jenkins does it, is that when a push gets made to the Manjaro-ARM github repo, it will trigger some build scripts. These can be found in the tarball.
Setting up Jenkins
You need the following to run the build server for Manjaro-ARM:
- The tarball with the jenkins content (like will follow later)
- 3 Devices, 1 armv6h, 1, armv7h and 1 aarch64. (I use an rpi1, odroid-xu4 and odroid-c2 for these)
- A machine that runs 24/7 to actually host the Jenkins server (I use my odroid-xu4 for this)
- The internet needs to be able to reach the previously mentioned server
- A way for all the devices to share data. (I use NFS shares for this)
Before we configue the Jenkins server directly, you need to be sure that all the folders, scripts and shares are setup as they need to be. A small guide for that can be found in the Jenkins zip archive.
All configuration of the jenkins service/server are localted in /etc/conf.d/jenkins and the defaults are sane. The lines you need to worry about are:
JENKINS_HOME=/var/lib/jenkins #owned by jenkins user JENKINS_WEBROOT=--webroot=/var/cache/jenkins #where the webpages load from JENKINS_PORT=--httpPort=8090 #The port it runs on
The contents of the 'jenkins-user-folder.tar.gz' should be in /var/lib/jenkins, but the archive contents the folder structure. Installing the Jenkins package sets up the webroot, so that's not an issue. If you want Jenkins to run on another port than '8090', change it in the config above.
To start the jenkins server, simply run this command.
$ sudo systemctl start jenkins
To enable it at boot time run this instead.
$ sudo systemctl enable jenkins
When the jenkins service is running you can see the page like this, assuming your jenkins port is 8090.
You can ofcourse redirect this stuff with DNS and in routers so you get an easy URL for outsiders to see too. This is right now used to show the Build Status on Github!
Configure jobs in Jenkins
Configuring jobs in jenkins is done inside the Jenkins user interface on the website.
If you extracted the jenkins-home-folder.tar.gz, all the jobs should be there right now and no setup is needed.
The fastest way to explain how to setup a new job, is to look how a previous one was set up and do it like that was done.
I might add a more detailed section here, if it's needed.