Can I create tents in Hudson / Jenkins?

I have Jenkins created to create XBMC images for different platforms. My system takes about 6 hours to create each image, so I prefer to run them in parallel, usually 2 or 3 at a time. The problem is that if they have to download module updates (for example, linux kernel or sometihng), simultaneously created 2 or 3 buildings will load at the same time, corrupting the download (they point to the same folder)

Is it possible to specify an offset in jenkins / hudson? (I know that you can plan assemblies and also use a trigger that is created after the completion of one project):

Line 1: immediately

Build 2: Run 20 minutes after Build 1

Assembly 3: start 20 minutes after assembly 2

I tried looking for a plugin as well as google but no luck. I also know that I could schedule using the cron-schedule features in jenkins, but I have a built-in trigger configured to poll the GIT repository to look for changes to build, I'm not just blind planning.

+4
source share
2 answers

One way to do this is to select the "Quiet period" option in the "Advanced" section.
Set the task to 1200 seconds for task 2 and 2400 seconds for task 3.

This means that Job 1 will be queued immediately when a change is noticed in git, Job 2 will be queued with a 20 minute delay and Job 3 with a 40 minute delay.

+4
source

Another way to do this is to make the task a kind of assembly stream (with the stream build plugin or taking into account the fact that the last task of task A is to complete task B). If you can include the download in your own task, you can define the download task as single-threaded, and the rest as multi-threaded.

Doing this serializes only what needs to be serialized. Performing "every twenty minutes" will take time when it takes 15 minutes to load, and will fail (possibly difficult to debug) when slowdown occurs, and loading will take about twenty-five minutes.

+1
source

Source: https://habr.com/ru/post/1382566/


All Articles