Re: Should my Jenkins user be a normal one with GUI?

2012-11-24 Thread Brad Knowles
On Nov 24, 2012, at 4:39 AM, frankgarcia  wrote:

> OMG!  That link is so useful. Now I no longer fear the part of code signing, 
> UI Automation + Frank, Pasteboard, Spotlight... and you confirmed my gut 
> feeling that running Jenkins as a background user has several downsides. Most 
> of blog posts I read about installing Jenkins gave instructions to install it 
> as a background user alone.

It was actually XCode that drove us over the fence.  There are too many things 
that are different between the GUI version of XCode and the command-line 
version (e.g., xcodebuild), and some of those things simply cannot be done from 
the CLI at all -- at least, not so far as we can tell.  E.g., things like key 
management for codesigning.


If you're working in a non-iOS/OS X environment, then I'm sure that background 
mode is probably fine.  But development for iOS and OS X assumes that you'll be 
using the GUI tools, and there's all sorts of wacky fallout that happens when 
you don't -- like #include paths that are different between XCode 4 and 
xcodebuild (which works more like XCode 3, I'm told), so that you have to 
modify your project files to include user header search paths that are 
appropriate for both.

Development for the iOS Simulator is also different from development for the 
Device (i386 vs. armv7 architectures), and that also requires things like 
different user header search paths.

I can't tell you how many pull requests I have in against the various projects 
we're supporting, just because all the developers up until now have been using 
GUI tools, and I'm having all sorts of weird problems they've never seen 
before.  So, I get to find the "bugs" and then create fixes that get uploaded 
to my forked copy of the repo, so that I can send them a pull request to make 
their code build correctly under Jenkins.

> I was not that serious about using my own account. I assume you guys have a 
> unique normal OSX user for Jenkins alone.

On our system, we end up installing well over a hundred Ruby gems and other 
tools, and trying to do those as a "normal" user is a pain.  We created an 
organizational user that is also an "admin" account, so as to reduce the pain 
level somewhat during the process of installing the stuff that needs to be 
installed.  YMMV, of course.

> While I spice up my Jenkins setup, I wish you next week full of non-fail 
> tests commits. Thanks a lot!

We're still in the process of getting our CI fully online and in production, 
but we're close.  Good luck with yours!

--
Brad Knowles 
LinkedIn Profile: 



Re: Should my Jenkins user be a normal one with GUI?

2012-11-24 Thread frankgarcia
Am Samstag, 24. November 2012 04:59:38 UTC+1 schrieb Brad Knowles:

> On Nov 21, 2012, at 2:08 AM, frankgarcia 
> > 
> wrote: 
>
> > Should I create a normal system user for my Jenkins server? If so, I 
> guess I will have to setup everything so every time the server starts, a 
> full blown background user GUI session starts only for Jenkins. Any 
> recommendations about how to do the auto-login in the background. I could 
> not find that information  and I am wondering what is the normal setup of 
> OSX users for Jenkins. 
>
> We run our Jenkins server using Jenkins.app (by Sami Tikka, see <
> https://github.com/stisti/jenkins-app>), and that at least lets us do OS 
> X and iOS UI testing with tools like frank-cucumber, as well as most of our 
> integration tests for our server-side code -- minus the four tests that 
> require interaction with Spotlight. 
>

OMG!  That link is so useful. Now I no longer fear the part of code 
signing, UI Automation + Frank, Pasteboard, Spotlight... and you confirmed 
my gut feeling that running Jenkins as a background user has several 
downsides. Most of blog posts I read about installing Jenkins gave 
instructions to install it as a background user alone.

I was not that serious about using my own account. I assume you guys have a 
unique normal OSX user for Jenkins alone.

While I spice up my Jenkins setup, I wish you next week full of non-fail 
tests commits. Thanks a lot!

Francisco


Re: Should my Jenkins user be a normal one with GUI?

2012-11-23 Thread Brad Knowles
On Nov 21, 2012, at 2:08 AM, frankgarcia  wrote:

> But that is not working for Mountain Lion. I am no longer looking for a 
> solution because now I believe this is not the real problem. I am planning to 
> add automated GUI tests for OSX and iOS, therefore I believe I will be having 
> more than just a pasteboard server not running problem.

Correct, there are certain privileges that are dropped when moving from a 
"foreground" process to a "background" one, having to do with interacting with 
Spotlight, among other things.  In Lion and Mountain Lion, we have not (yet) 
figured a way around that problem.

> Should I create a normal system user for my Jenkins server? If so, I guess I 
> will have to setup everything so every time the server starts, a full blown 
> background user GUI session starts only for Jenkins. Any recommendations 
> about how to do the auto-login in the background. I could not find that 
> information  and I am wondering what is the normal setup of OSX users for 
> Jenkins.

We run our Jenkins server using Jenkins.app (by Sami Tikka, see 
), and that at least lets us do OS X and 
iOS UI testing with tools like frank-cucumber, as well as most of our 
integration tests for our server-side code -- minus the four tests that require 
interaction with Spotlight.

> As quick/dirty solution I could just make Jenkins run under the same user I 
> normally log in into my server... but that seems kind of... non-ethical?

I would say unwise, as opposed to unethical.  If you get hit by a bus and your 
personal account gets deleted by your employer, the Jenkins system shouldn't be 
shut down as a result.

You want to use organizational keys and accounts for all this sort of stuff 
(including for code signing), so that the system is not dependent on any 
particular "normal" user account continuing to be in existence long after the 
person themselves actually departed.

--
Brad Knowles 
LinkedIn Profile: 



Should my Jenkins user be a normal one with GUI?

2012-11-21 Thread frankgarcia
My current Jenkins installation runs in the background with a user that has 
no shell and no GUI

So far that is the normal setup I have read around. However my latest unit 
tests for drag/drop operations are failing because such user does not have 
a running pasteboard service. I am still trying to find out how start that 
service. Googling around I found this:

> nohup /System/Library/CoreServices/pbs &

But that is not working for Mountain Lion. I am no longer looking for a 
solution because now I believe this is not the real problem. I am planning 
to add automated GUI tests for OSX and iOS, therefore I believe I will be 
having more than just a pasteboard server not running problem. 

Should I create a normal system user for my Jenkins server? If so, I guess 
I will have to setup everything so every time the server starts, a full 
blown background user GUI session starts only for Jenkins. Any 
recommendations about how to do the auto-login in the background. I could 
not find that information  and I am wondering what is the normal setup of 
OSX users for Jenkins.

As quick/dirty solution I could just make Jenkins run under the same user I 
normally log in into my server... but that seems kind of... non-ethical?

thanks in advance
Francisco Garcia