简体   繁体   English

如何为

[英]How to setup buildbot for

I am quite new to buildbot and struggling to create a configuration for the following python code structure: 对于buildbot来说,我是一个新手,正在努力为以下python代码结构创建配置:

A library containing some general classes and functions and two programs who depend on the one library. 一个库,其中包含一些常规类和函数以及两个依赖于一个库的程序。 All three have their own git repository. 这三个都有自己的git仓库。 Lets call the library the_lib and the programs prog_a and prog_b . 让我们调用库the_lib以及程序prog_aprog_b

What I would like buildbot to do for me is periodically check the repositories for changes and if so rebuild what is necessary. 我希望buildbot为我做的是定期检查存储库中的更改,如果需要,请重新构建。 So a change to the source of the_lib should rebuild all three, a change to the source of prog_a should only rebuild prog_a and a change to the source of prog_b should only rebuild prog_b . 因此,更改the_lib的源应该重新the_lib所有这三个,更改prog_a的源应该仅重新prog_a ,更改prog_b的源应该仅重新prog_b

I am at the point where I am able to build any of the three when its source changes but how do I introduce de dependency of prog_a and prog_b on the_lib ? 我在点我可以构建任何三个地方当其来源的变化,但我怎么介绍的去依赖prog_aprog_bthe_lib

Cheers, Feoh 干杯,Feoh

You can trigger multiple builders with a single source change, in the following example the first two each trigger their own builds, but the third one triggers all three: 您可以使用一个源更改触发多个构建器,在以下示例中,前两个分别触发自己的构建,但是第三个触发所有三个:

  yield basic.AnyBranchScheduler(
            name = prog_a, treeStableTimer=delay,
            change_filter = my_a_filter,
            builderNames = [prog_a],
            )

  yield basic.AnyBranchScheduler(
            name = prog_b, treeStableTimer=delay,
            change_filter = my_b_filter,
            builderNames = [prog_b],
            )

  yield basic.AnyBranchScheduler(
            name = the_lib, treeStableTimer=delay,
            change_filter = my_lib_filter,
            builderNames = [prog_a, prog_b, the_lib],
            )

For the changes in the prog_(a|b) you can use a simple single branch scheduler that will call their builders. 对于prog_(a|b)的更改,您可以使用一个简单的单分支调度程序来调用其构建器。

For the_lib you have two options: 对于the_lib您有两个选择:

  1. Create a Dependant scheduler for the builders of prog_a and prog_b , and set the upstream scheduler as the single branch scheduler of the_lib . prog_aprog_b的构建器创建一个从属调度程序,并将上游调度程序设置为the_lib的单个分支调度the_lib
  2. Configure for the prog_(a|b) a Triggerable scheduler, and trigger them using the Trigger build step from the_lib builder. prog_(a|b)一个可触发的调度程序,并使用the_lib构建器中的Trigger build步骤来触发它们。

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

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