[users at bb.net] Getting source URL and revision in build step

Pierre Tardy tardyp at gmail.com
Thu Nov 16 16:01:40 UTC 2017


Yes, that use case is a bit complicated as well.

You can use manifestBranch=Interpolate("%(src:branch)s")  but that actually
only works if the actual change is for the manifest project.

So you would need a renderer function. something like:

manifestBranch=detectManifestBranch

@util.renderer
def detectManifestBranch(props):
     if props.getProperty("repository", "").endswith("manifest"):
          return props.getProperty("branch")
     return "master"


On Thu, Nov 16, 2017 at 3:37 PM Will Newton <will.newton at gmail.com> wrote:

> On Thu, Nov 16, 2017 at 1:49 PM, Pierre Tardy <tardyp at gmail.com> wrote:
> > Hi Will,
> >
> > Repo is a little bit different from the other source control, as it is a
> > higher level interface to git.
> >
> > The manifest repository does not itself point to the source code that
> > Buildbot should be watching, but rather points to a list of repositories
> > that buildbot should be watching.
> >
> > So the way that is currently in buildbot open source code is to have a
> > builder per manifest, then you would hardcode the manifest url and branch
> > that you are looking at.
>
> I'm not sure what this workflow looks like to the developer. Could you
> explain?
>
> I am imagining something like:
>
> 1. I modify a repository
> 2. I create a branch in the manifest repository that points the
> repository in question to the new revision in the manifest
> 3. A build occurs to tell me if this change was good
> 4. I merge the change to the release branch
>
> It seems like the current model means I can setup builders for a fixed
> set of branches so I could only build my release branches?
>
> > Finally you would setup a scheduler which watch the branches you know
> that
> > the manifest is pointing to.
> >
> > A better approach would be to parse the manifest and to watch exactly the
> > touple (repository, branch) that the manifest is really pointing at, but
> > this is much more complicated. (In my previous job, this is what we were
> > doing, but the code was quite specific to our workflow, and we never
> > upstreamed it)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20171116/8d3895cb/attachment.html>


More information about the users mailing list