简体   繁体   English

从Linux在远程Windows上运行bat文件

[英]Run bat file on remote Windows from Linux

I am working on continious integration process and I am using Linux platform for my Jenkins but now I need to run bat file on remote pc(Windows) to start automation tests processing and send report. 我正在进行持续集成过程,并且正在为我的Jenkins使用Linux平台,但是现在我需要在远程pc(Windows)上运行bat文件以启动自动化测试处理并发送报告。 Is there any possibility to do this? 有可能这样做吗?

在该窗口上运行另一个詹金斯实例,并使用远程触发器插件来触发蝙蝠。

You can use NodeLabel Parameter Plugin + Parametrized Trigger Plugin to run job on one or several Windows machines. 您可以使用NodeLabel参数插件+参数化触发器插件在一台或多台Windows计算机上运行作业。 To start job on all machines in parallel, read this page 要在所有机器上并行开始作业,请阅读此页

There's a bit of a learning curve to this approach, but I suggest installing Cygwin on the Windows box. 这种方法有一些学习曲线,但是我建议在Windows机器上安装Cygwin。 Among Cygwin's many ports of UNIX software is the SSH daemon. SSH守护程序是Cygwin的UNIX软件的许多端口之一。 This is a very detailed tutorial for installing sshd on Windows: http://inside.mines.edu/fs_home/gmurray/HowTo/sshNotes.html . 这是在Windows上安装sshd的非常详细的教程: http : //inside.mines.edu/fs_home/gmurray/HowTo/sshNotes.html It should be easy to get the SSH client going on Linux. 使SSH客户端在Linux上运行应该很容易。

Then you'd run something like this: ssh windowsuser@windowsbox 'c:\\path\\script.bat' 然后,您将运行以下命令:ssh windowsuser @ windowsbox'c:\\ path \\ script.bat'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM