在詹金斯的多个终端窗口? [英] Multiple terminal window in Jenkins?

查看:78
本文介绍了在詹金斯的多个终端窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

致谢我已经从一些Jenkins教程开始学习该工具. 作为练习,我想开始我的Angular项目并在其上运行一些量角器e2e测试.

Recenlty I have started with some Jenkins tutorials to learn about this tool. As an excersise I would like to start my Angular project and run some protractor e2e tests on it.

通常,我会打开终端窗口,键入:npm install,npm start并运行量角器测试.我有一个问题要在詹金斯上执行. 命令"npm start"将在localhost:4200上运行我的角度应用程序.这需要一些时间,并且此终端窗口被冻结"后,有信息表明我的应用程序正在本地主机上运行,​​但是如果我要运行测试,则需要打开另一个终端窗口并在其中键入命令.

Normally I would open terminal window, type : npm install, npm start and run protractor tests. I have one issue though to execute this on Jenkins. Command 'npm start' will run my angular application on localhost:4200. That require some time and after that this terminal window is "frozen" there is information that my application is running on localhost but if I want to run tests I need to open another terminal window and type command there.

我不知道如何在Jenkins中执行此操作,因为当我运行我的项目并观察日志时,我可以看到我的项目正在运行并且一切正常,但是由于此终端窗口,我无法键入任何命令来运行测试忙于信息: webpack:编译成功.

I don't know how to do this in Jenkins because when I run my project and observe logs, I can see that my project is running and everything is OK, but I cannot type any command to run test because this terminal window is busy with info: webpack: compiled successfully.

我可以在Jenkins构建和运行命令期间以某种方式打开另一个终端窗口吗?

Can I somehow open another terminal window during Jenkins build and run command there?

推荐答案

在命令末尾使用&,它将在后台运行它并且不会冻结终端.

Use & at the end of the command that will run it in background and didn't freeze the terminal.

但是,按照我的看法,我认为如果您通过Jenkins运行cmd不会冻结终端.

But As per me I don't think if you are running cmd through Jenkins will froze the terminal.

每个构建步骤都是Jenkins产生的一个独立过程.尽管您对位置进行了硬编码,但它们不共享任何内容,也不会共享当前目录,也不会在构建步骤中设置/更改环境变量.每个新的构建步骤都从在父进程(运行Jenkins的父进程)中产生一个新进程开始

Each build step is a separate process that Jenkins spawns off. They don't share anything, neither current directory, nor environment variables set/changed within the build step in-spite you hard coded the location. Each new build step starts by spawning a new process off the parent process (the one running Jenkins)

如果&对您不起作用,请分享一些屏幕截图.

Please share some screenshot if & didn't work for you.

这篇关于在詹金斯的多个终端窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆