[英]jenkins does not complete 'execute windows command' step
I am running a bunch of windows commands as the build step in Jenkins using the "Execute Windows batch command" option. 在Jenkins中,我使用“执行Windows批处理命令”选项来运行一堆Windows命令作为构建步骤。 However, the build stops after executing some of the commands, ignoring the rest, and says "Finished: SUCCESS". 但是,在执行某些命令后,构建将停止,而忽略其余命令,并显示“ Finished:SUCCESS”。 Here's kind of how my "Execute Windows batch command" looks: 这是我的“执行Windows批处理命令”的样子:
xcopy source\dir dest\dir
7z x file_name.zip
cd extracted_dir_name
rmdir /s /q stale_output
command_to_be_run
another_command_to_be_run
post_processing_
copy_and_zip_commands_
Jenkins executes until another_command_to_be_run
, and then just stops as if there are no other commands after that, and says "Finished: SUCCESS". Jenkins一直执行到another_command_to_be_run
为止,然后停止,就好像之后没有其他命令一样,然后说“ Finished:SUCCESS”。 Why is this happening? 为什么会这样呢? How do I execute the post-processing commands? 如何执行后处理命令?
PS: command_to_be_run
and another_command_to_be_run
take more than a few seconds, but I don't know if that matters. PS: command_to_be_run
和another_command_to_be_run
花费了几秒钟的时间,但是我不知道这是否重要。
Edit: I've later tried commenting out another_command_to_be_run
with REM
, and then all the other post-processing commands run fine. 编辑:我后来尝试用REM
注释掉another_command_to_be_run
,然后所有其他后处理命令运行正常。 Soooo Strange! 太奇怪了! Hope this rings any bells. 希望这能敲响钟声。 Thanks in advance..!!! 提前致谢..!!!
Most likely, one of the commands you are running is a .bat or .cmd file. 您运行的命令之一很可能是.bat或.cmd文件。 If you don't use the "call" keyword before calling one of those, your main script will stop after that point. 如果您在调用其中一个之前没有使用“ call”关键字,则主脚本将在此之后停止。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.