How to prevent certain Jenkins jobs from running simultaneously?

后端 未结 6 628
旧巷少年郎
旧巷少年郎 2020-12-01 11:41

I have a couple of jobs that use a shared resource (database), which sometimes can cause builds to fail in the (rare) event that the jobs happen to get triggered simultaneou

6条回答
  •  清歌不尽
    2020-12-01 12:12

    N.B. you don't need physical or virtual hardware for a slave/node, you can set up "slaves" that run on the master server.

    Manage Jenkins > Manage Nodes > New node

    and make a "dumb slaves" each with its own root directory.

    Create a few slaves, execute them when the server boots, and then you have essentially created pools of executors.

    You might have, say...

    db - only one executor in your case. compile - limit according to hardware or # of CPUs. scripts - have many executors for all those little jobs that Jenkins is good at doing.

提交回复
热议问题