简体   繁体   English

Jenkins 可以同时运行多个作业吗

[英]Can Jenkins run several jobs in the same time

I have Jenkins installed for running test automation running on Java, Maven,JMeter etc. The Builds are not generating deployment files and folders, but only reports for the tests.我安装了 Jenkins 以运行在 Java、Maven、JMeter 等上运行的测试自动化。构建不会生成部署文件和文件夹,而只会生成测试报告。 Can I build several jobs one after another (almost in the same time) to run in parallel?我可以一个接一个地(几乎同时)构建多个作业以并行运行吗? they don't have to be exactly in the same time.他们不必完全在同一时间。 I just want to make sure that starting the 2nd build won't stop/damage the 1st (already running) build.我只是想确保启动第二个构建不会停止/损坏第一个(已在运行)构建。 Thanks谢谢

Yes it's possible.是的,这是可能的。

Go to your job -> configuration and check: Execute concurrent builds if necessary转到您的工作 -> 配置并检查:如有必要,执行并发构建

Doc:文件:

If this option is checked, Jenkins will schedule and execute multiple builds concurrently (provided that you have sufficient executors and incoming build requests.) This is useful on builds and test jobs that take a long time, as each build will only contain a smaller number of changes, and the total turn-around time decreases due to the shorter time a build request spends waiting for the previous build to complete.如果选中此选项,Jenkins 将同时调度和执行多个构建(前提是您有足够的执行程序和传入的构建请求。)这对于需要很长时间的构建和测试作业非常有用,因为每个构建将只包含较小的数量更改,并且由于构建请求花费在等待上一个构建完成上的时间更短,因此总周转时间减少了。 It is also very useful with parameterized builds, whose individual executions are independent from each other.它对于参数化构建也非常有用,其单独的执行是相互独立的。

For other kinds of jobs, allowing concurrent executions of multiple builds may be problematic, for example if it assumes a monopoly on a certain resource, like database, or for jobs where you use Jenkins as a cron replacement.对于其他类型的作业,允许多个构建的并发执行可能会出现问题,例如,如果它假定对某个资源(如数据库)的垄断,或者对于使用 Jenkins 作为 cron 替代品的作业。

转到您的工作 -> 配置并检查布尔值: Do not allow concurrent builds

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

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