简体   繁体   English

jenkins:Windows XP,Windows 7从站无法执行命令

[英]jenkins: windows xp, windows 7 slave cannot execute commands

I have a Arch Linux master that drive 2 arch linux slaves, 1 windows xp slave and 1 windows 7 slave. 我有一个Arch Linux主驱动器,可驱动2个arch linux从属设备,1个Windows xp从属设备和1个Windows 7从属设备。 Linux part is all ok, I managed in some way to start windows slave using automatic execution and slave.jar. Linux部分还可以,我以某种方式管理使用自动执行和slave.jar启动Windows slave。 I have an external program that need to be executed and it's installed on c:\\program files (x86) on windows7 and on c:\\programs on windows xp. 我有一个需要执行的外部程序,它已安装在Windows7的c:\\ program文件(x86)和Windows XP的c:\\ programs上。 I went on path variables and inserted the two path on the two systems, but when I try to run jenkins build it says "command not found" 我继续使用路径变量并在两个系统上插入了两个路径,但是当我尝试运行jenkins build时,它说“找不到命令”

I tryed to place 2 bat files in c:\\ poining to the right place, based on every system, but it says c:\\build.bat command not found. 我尝试将2个bat文件放置在c:\\中,根据每个系统定位到正确的位置,但是它说c:\\ build.bat命令未找到。 I can see the file in the right place... 我可以在正确的位置看到文件...

How do you manage executables placed in different places on different computers? 您如何管理放置在不同计算机上不同位置的可执行文件? there's a better way to run the program? 有更好的方法来运行程序吗? I can change everything about this installation, the only thing I need it to find a way for starting that program. 我可以更改有关此安装的所有内容,这是我找到启动该程序的唯一方法。

thank you for your help. 谢谢您的帮助。

Have you verified that the changes you made to the system path were actually saved? 您是否已验证对系统路径所做的更改实际上已保存? Make sure both of the slaves have been rebooted and then test this via a standard command line window. 确保两个从站都已重新启动,然后通过标准命令行窗口对其进行测试。

If the program you're trying to execute is actually on the path, you could also look at the Envfile Plugin . 如果您要执行的程序实际上在路径上,那么您也可以查看Envfile插件

在将新路径添加到环境变量PATH之后,您需要重新启动jenkins从属服务,以使其能够使用这些新PATH。

I solved the problem changing the way jenkins start the job on the slave. 我解决了更改詹金斯在奴隶上开始工作的方式的问题。 I used "Execute shell" and some program are executed. 我使用了“执行外壳”,并且执行了一些程序。 I changed "Execute shell" with "Execute windows batch command" and everything works fine. 我用“执行Windows批处理命令”更改了“执行外壳”,一切正常。

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

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