[users at bb.net] Trigger new build/scheduler when two related builds are finished
Roland van Laar
roland at micite.net
Mon Jul 31 11:44:03 UTC 2023
Hi,
To summarize, the desired workflow is:
- kick off two builds: arm64 and x64
- combine output into one universal installer.
My advice use a trigger[1] with `waitForFinish`.
build = BuildFactory()
build.addStep(steps.Trigger(schedulerNames=["buildx64", "buildarm64"],
waitForFinish=True)
build.addStep(<universtal_installer_step>)
Regards,
Roland
[1]
https://docs.buildbot.net/latest/manual/configuration/steps/trigger.html#trigger
On 31-07-2023 11:00, Yngve N. Pettersen wrote:
> Hello all,
>
> We have a build sequence that consists of two separate builds that are
> then combined into a single product (specifically, this concerns Mac
> x64 and arm64 builds being used to generate a universal DMG installer)
>
> At present we are building both sequentially on the same build worker
> which makes the system work, but we are now preparing a new worker
> that will be used for the arm64 build.
>
> The plan is to start both builds at the same time, but that prevents
> the transfer of the (build properties) data necessary to combine the
> products into a universal installer. We could, of course, continue
> with the sequential builds, but the reason for the second builder is
> that these combined builds take very long to generate.
> The Dependent scheduler
> <http://docs.buildbot.net/current/manual/configuration/schedulers.html#dependent-scheduler>
> (which, BTW is still the v3.6 version of the documentation, not the
> v3.8 version) seems to fit the bill for what we need, *except* that it
> depends on *all* the builds triggered by the initial scheduler, not
> just specific builders in that set. That is not desirable in our
> scenario.
>
> What we need is something like
>
> --------------
>
> from buildbot.plugins import schedulers
> build = schedulers.SingleBranchScheduler(name="build",
> treeStableTimer=5*60,
> builderNames=["builder1",
> "builder2", "builder3", ..., "builderN"])
> second_step = schedulers.Dependent(name="second-step"",
> upstream=build,
> upstream_builders=["builder1", "builder2"]
> builderNames=["second_step_builder"])
> ---------------
>
> This would trigger "second-step" when both "builder1" and "builder2"
> have completed their jobs, ignoring the state of the other builders.
>
> Is there any way to accomplish this currently, either directly, or by
> creating a subclass of Dependent?
>
>
> There is, however, if I read the documentation correctly, a problem
> with Dependent: It sounds like there is no transfer of build
> properties from the upstream builders, which is a problem, since those
> properties are necessary to inform the second step builder where to
> locate the data needed for its build.
>
>
> A different method that might work better could be a scheduler that
> triggers when it has received all Triggers from specific builders in a
> particular scheduler job
>
>
> Any thoughts about this possibility?
>
More information about the users
mailing list