cdugga
cdugga

Reputation: 3859

Executing batch file on Windows 2008 server from CentOS Jenkins instance

I have a Jenkins instance running on CentOS and would like the ability to connect to a Windows 2008 virtual server and have execute and write permissions.

Some threads have suggesting CYGWIN, installing on the windows machine and then using SSH to connect. There are also suggestions of telnet and RDP. I wanted to know if there is a recommended approach.

Thanks

Upvotes: 0

Views: 290

Answers (3)

Luigi Polvani
Luigi Polvani

Reputation: 405

I have to make Delphi builds on windows with my main jenkins installation is on a CentOS server.

You just need to configure the windows machine as jenkins slave. Java web start is a quick and easy solution (2 minutes) for that: https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds#Distributedbuilds-LaunchslaveagentviaJavaWebStart Or step-by-step here: https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines

Then on "Project setup" check the "Restrict where this project can be run" and write down the slave name. (There will be time later for more complicated expressions)

Finally istruct your project to exec windows commands adding one of those plugins

  • https:// wiki.jenkins-ci.org/display/JENKINS/PowerShell+Plugin
  • https:// wiki.jenkins-ci.org/display/JENKINS/Windows+Exe+Runner+Plugin

(sorry for the broken links but it doesn't let me post more than two)

Upvotes: 1

KeepCalmAndCarryOn
KeepCalmAndCarryOn

Reputation: 9075

You can connect a windows slave node into your main server

https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines

as mentioned earlier in a comment

Upvotes: 1

cure
cure

Reputation: 2688

If it's just a few times use netcat.
Otherwise use cygwin and ssh like you said.

Upvotes: 0

Related Questions