Multiple terminal window in Jenkins?

三世轮回 提交于 2020-01-15 10:15:49

问题


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.

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.

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.

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


回答1:


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

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

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.



来源:https://stackoverflow.com/questions/45650509/multiple-terminal-window-in-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!