如何在Jenkins作业中启动Window exe文件 [英] How to start a Window exe file in a Jenkins job
问题描述
我有一个詹金斯(Jenkins)工作,需要启动Windows程序.
我试图使用Python的子进程来启动程序,但是看起来当我的python退出时,程序也退出了.某种程度上讲这是有道理的,因为它是一个子过程...然后我尝试在Jenkins工作中像这样cmd c:\myprogram.exe
来启动它,但它仍然不起作用....
I have a Jenkins job in which I need to start windows program.
I've tried to use subprocess of Python to start the program, but it looks like when my python exits, the program also exits. It somehow makes sense because it's a sub process... Then I tried to start it like this cmd c:\myprogram.exe
in Jenkins job, it still does not work....
有什么建议吗?
推荐答案
您将要使用 START 将程序启动到单独进程中.
You'll want to use START to launch the program into a separate process.
尝试START c:\myprogram.exe
检查以下bash以进行测试.
Check following bash for a test.
@echo off echo "launching notepad.exe" notepad.exe echo "Marker 1" pause echo "launching notepad.exe with START" START notepad.exe echo "Marker 2" pause
@echo off echo "launching notepad.exe" notepad.exe echo "Marker 1" pause echo "launching notepad.exe with START" START notepad.exe echo "Marker 2" pause
这篇关于如何在Jenkins作业中启动Window exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!