Running a jenkins windows batch command non-headless mode

1,444 views
Skip to first unread message

bluntcoder

unread,
May 1, 2014, 8:14:20 AM5/1/14
to jenkins...@googlegroups.com
Hi there.

Hopefully this is an easy answer.

I have an automated test I'm trying to run that requires initialization of the graphics driver, and thus I need a window to pop up in Windows. Is there anyway within a Jenkins project to make a command run it in interactive, on the desktop mode instead of it being headless? I have already switched the Jenkins user to use it's own independent system account, windows login and all, but that still hasn't done the trick.

Thanks!

Eric Pyle

unread,
May 1, 2014, 8:18:13 AM5/1/14
to jenkins...@googlegroups.com
People I know who've done this have run the Windows test machine as a JNLP slave.

Eric
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

k.thi...@comcast.net

unread,
May 1, 2014, 8:30:52 AM5/1/14
to jenkins...@googlegroups.com
Yeah you should be able to install the slave as a service
Go into services, right click on the slave service and go to properties
Go to the "Log On" tab and check the box that says "Allow service to interact with desktop"


From: "Eric Pyle" <eric...@cd-adapco.com>
To: jenkins...@googlegroups.com
Sent: Thursday, May 1, 2014 7:18:13 AM
Subject: Re: Running a jenkins windows batch command non-headless mode

Mark Mikulec

unread,
May 1, 2014, 8:58:02 AM5/1/14
to jenkins...@googlegroups.com

This is my main Jenkins box though. How will this affect all my other jobs?

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/LplqhAFcLrc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.

k.thi...@comcast.net

unread,
May 1, 2014, 9:09:54 AM5/1/14
to jenkins...@googlegroups.com
It really shouldnt affect the other jobs, however, to be safe you could set up a slave service on the main jenkins box so that it has the main jenkins service and a slave service.  Set up that particular job to run on that slave rather than the master.


From: "Mark Mikulec" <mik...@gmail.com>
To: jenkins...@googlegroups.com
Sent: Thursday, May 1, 2014 7:58:02 AM

Mark Mikulec

unread,
May 1, 2014, 10:43:14 AM5/1/14
to jenkins...@googlegroups.com

Since I'm using already a custom Jenkins local account, I do not have that option. Which is why I'm confused that it doesn't work. Maybe its because its a service?

On May 1, 2014 8:31 AM, <k.thi...@comcast.net> wrote:
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/LplqhAFcLrc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.

k.thi...@comcast.net

unread,
May 1, 2014, 10:57:09 AM5/1/14
to jenkins...@googlegroups.com
I'm not sure about that.  Is there a reason you need to use a custom account instead of local system?

As I said, you could set up a slave service to run on this machine for certain jobs and have that be under local system.



From: "Mark Mikulec" <mik...@gmail.com>
To: jenkins...@googlegroups.com
Sent: Thursday, May 1, 2014 9:43:14 AM

Scott Evans

unread,
May 1, 2014, 10:58:28 AM5/1/14
to jenkins...@googlegroups.com
Make sure the service is set to interact with the desktop, but I believe you also need to make sure that there's an account logged in, so there's a desktop session to interact with.

Scott

Mark Mikulec

unread,
May 1, 2014, 11:05:12 AM5/1/14
to jenkins...@googlegroups.com

The reason is due to a bug in the mercurial plugin that requires an authentication token be cached in the users profile. Otherwise the job would always re-clone the repo every build.

Mark Mikulec

unread,
May 1, 2014, 11:07:49 AM5/1/14
to jenkins...@googlegroups.com

There is no option to interact with desktop (unless its a command line switch). But being logged in as that user seems kind of obvious now. I will try it. thanks!

Mark Mikulec

unread,
May 1, 2014, 11:19:52 AM5/1/14
to jenkins...@googlegroups.com

Nope, even when I'm logged on, it doesn't work.

However I stopped the service and ran it directly via the command line. That in fact did work. A bit sloppy, but that's just the way windows is.

Thanks for everyone's help!

bc

k.thi...@comcast.net

unread,
May 1, 2014, 11:23:59 AM5/1/14
to jenkins...@googlegroups.com
Then I would suggest creating a batch script or something that starts the service when the user logs in by putting it in the startup folder.
Sent: Thursday, May 1, 2014 10:19:52 AM
Reply all
Reply to author
Forward
0 new messages