KISS

Be Among the 20% of the Best!

Jenkins Clang Scan-Build Plugin: Support Matrix Builds

| comments

I’m using Jenkins to build iOS projects (as you may have noticed from my previous jenkins posts). One of build steps that can help developers is running the Clang scan-build static analyzer and publishing the results. Luckily, there is an existing Clang Scan-Build Jenkins plugin available, however it hasn’t been updated for a while. I stumbled upon Sean Wang’s blog post (https://fclef.wordpress.com/2014/10/11/jenkins-clang-scan-build-plugin-support-for-xcode5-and-later/) describing his fixes for latest Xcode. That’s a great update!

So it worked fine until I needed to use it in a matrix (aka multi-configuration) project. It was missing from the list of available build steps! One solution is to emulate the matrix build by having N regular builds, one for each of the configurations, to run the analyzer, but that would be very painful to maintain.

Jenkins Doesn’t Run as a LaunchAgent?

| comments

If you are interested in Jenkins and followed my post about setting it up in a virtual machine, you should be totally fine. However, when I was messing with it, I had an issue when the jenkins agent wouldn’t start:

1
2
3
launchctl load ~/Library/LaunchAgents/org.jenkins-ci.plist
launchctl load ~/Library/LaunchAgents/org.jenkins-ci.plist
/Users/Shared/Jenkins/Library/LaunchAgents/org.jenkins-ci.plist: Operation already in progress

Jenkins: Admin Is Missing the Overall/Read Permission

| comments

I stumbled upon this issue recently: somebody has created an admin user in a fresh Jenkins installation (most likely, through the normal Jenkins interface). However, after a few days, they couldn’t login as the admin, seeing this error:

admin is missing the Overall/Read permission

Sync Time in VirtualBox OS X Guest

| comments

Virtualization is great! It allows me to mess up with my Jenkins setup trying to figure out how to configure iOS jobs with tests (jumping through a number of hoops on the way, hi Apple!). One point though is that the guest OS X in VirtualBox has terribly slow graphics, and also freezes after some time. Only restart helps. Hopefully, I usually need ssh and jenkins web interface only. Read about how to set that up here: Jenkins in OSX guest in VirtualBox for iOS jobs – full setup guide.

Anyway, due to missing VBox additions on OSX guest, time doesn’t update when the machine is suspended and then resumed. Plus, there is a constant time drift. Explanations here: https://forums.virtualbox.org/viewtopic.php?f=22&t=48233.

Jenkins in OSX Guest in VirtualBox for iOS Jobs – Full Setup Guide

| comments

Hello there!

In this post, I will describe how to setup a sandboxed Jenkins server in a virtual machine where you can play and try your iOS (and not only) jobs. I’m using the latest OS X Yosemite 10.10.2 for the host and the guest on a MacBook Pro. Nota Bene: according to the Apple’s EULA for OS X, you are allowed to run the OS on the Apple hardware only.

This how-to assumes you know what a command-line is, how to run commands, and related stuff.

Source Code License Check in Jenkins Job

| comments

When you’re working on an open source project, it’s pretty important for your project to be licensed under an open-source license. I know, picking one is not easy, so here are a couple of sites to help: http://choosealicense.com and https://tldrlegal.com/licenses/tags/Open%20Source.

So, you’ve picked a license, now you need to make sure every source file includes a mention of it. (I don’t know if that’s strictly necessary, but it is highly recommended). You can setup your editor/IDE to include it in a file template, and Jenkins is going to verify every single file has it. Following is my way to set it up (for Objective-C iOS projects, and you can easily tweak it to other languages).

iOS: Testing No Space Left Situation

| comments

How do you test that your app handles “no space left on device” errors properly? There is a (boring) way to stuff up your device until it’s full and test that way. It’s not the most convenient way though, especially if you want to test faster on the iOS Simulator. Here’s my solution: mount a small RAM disk for the Applications directory in the simulator.