Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure branches to build in addition to default branch #304

Open
steveej opened this issue Sep 30, 2024 · 5 comments
Open

configure branches to build in addition to default branch #304

steveej opened this issue Sep 30, 2024 · 5 comments
Assignees

Comments

@steveej
Copy link

steveej commented Sep 30, 2024

i'm working on repositories that have continuous delivery pipelines based on multiple branches.
for this to work with buildbot-nix there needs to be an option that takes a list of branch names that buildbot will consider acting upon exactly in the same way it does for the default branch.

@Mic92
Copy link
Member

Mic92 commented Sep 30, 2024

I think a list of regexes in the nixos configuration would be the best. Pull requests welcome.

@Mic92
Copy link
Member

Mic92 commented Oct 1, 2024

After checking again, we actually shouldn't make it a list but a single regex.
So just make this property configurable:

branch_re="(gh-readonly-queue/.*|staging|trying)",

You will need to extend this object:

class BuildbotNixConfig(BaseModel):

and add a nixos option similar to other configuration.

Use (gh-readonly-queue/.*|staging|trying) as the default value

We have checks for "default_branch" in several places, you might need to grep and see if we need to allow also non-default branches that matches the regex or not.

@MagicRB
Copy link
Contributor

MagicRB commented Oct 5, 2024

Will tackle this now and tomorrow

@MagicRB MagicRB self-assigned this Oct 5, 2024
@MagicRB
Copy link
Contributor

MagicRB commented Oct 6, 2024

I'm tackling this in a way where we split branches into 3 groups:

  • PR branches, get built automatically but don't trigger output writing (currently)
  • primary branches, concrete list (regex) of branches, behave exactly the same as the default branch which is implicitly part of this list
  • secondary branches, concrete list (regex) of branches, behave exactly as PR branches just that their hardcoded

not sure if the primary/secondary split is needed, but not hard to do, we can rip it out later. (we'll have to rewrite this anyway, i really do not like that this is global for the whole instance. I think we should prioritize per repo configs finally )

@MagicRB
Copy link
Contributor

MagicRB commented Oct 6, 2024

@steveej #312 is a thing now, can you check the master.nix changes whether the semantics satisfy your needs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants