1

I'm testing gui apps in slave machine . so I want Jenkins slave should be connected with master whenever I logged in. Right now I did some batch scripts to invoke slave connection. Is there any other way to do this same work then please let me know.

mahinlma
  • 1,208
  • 3
  • 11
  • 24

1 Answers1

0

Guessing from your "batch scripts" I assume you're using Windows. See Install Slave as a Windows service.

BUT: See also Windows Service needs desktop and network access:

Windows service can run under either a network authenticated user, or the local system. The network user services do not interact with the desktop, and local system services do not have access to network resources. To my knowledge, there is no way around this without spawning sub-processes as different users. However, there is a work-around. Split your service into two services one runs under the local system, and can interact with the desktop. The other will run under the network user account with access to the desired network resources. Set up these services to communicate with each other, and each can supply the functionality that it has access to. NOTE: when setting up the services in your install package you may want to make one of the services dependent on the other to make sure that both run together.

I couldn't have said it better.

UPDATE

In other words: When needing Desktop and network access batch scripts launched via:

are the ways to go.

Community
  • 1
  • 1
Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
  • But If I use Jenkins as Service in windows it won't allow any GUI operation. – mahinlma Jul 27 '15 at 11:49
  • It supports only background running operations – mahinlma Jul 27 '15 at 11:49
  • @Mahi That's not completely right: A service running under a user other than _local system_ doesn't allow Desktop access. A service running under _local system_ does allow Desktop access but not access to the network. I updated my answer accordingly. – Gerold Broser Jul 27 '15 at 12:52