268
Allow branch whitelist to override “Only build pull requests”
complete
T
Tom Wilson
This is mostly copied from a thread in the Community Forum here - https://discuss.circleci.com/t/allow-branch-whitelist-to-override-only-build-pull-requests/6392
The goal is to be able to have Circle automatically build all commits to the default branch
as well as
other specially named branches without having to build non-PR branches. This is very useful for those of us who have expensive steps in our build process (like tests that run on external servers, or those using the mac OS builds who want to save minutes).Minimum viable here would be to allow a list of branch names. Better would be to allow a list of branch names and/or regexes to specify branches.
We have a work-around that we developed locally by opening up fake PRs from our release branches into master as part of our process. But it's manual, error prone, and inelegant. Supporting a whitelist would be much nicer.
CCI-I-215
S
Sebastian Lerner
complete
S
Sebastian Lerner
Following up on my comment below, this is now available for self-serve use via the CircleCI API. Details here: https://discuss.circleci.com/t/product-launch-override-only-build-prs-setting/47807
Mahmoud Saada
We are interested in adopting Github Merge Queue features which do not use PullRequests and instead use specially named branched gh-readonly-queue.* regex pattern. We definitely need this feature to be possible at either the config.yaml level or in the UI.
S
Sebastian Lerner
Hi all, I am a product manager at CircleCI, thank you for helping me understand the pain-point here. I have an update to share that aims to help in the interim:
While users cannot enable this functionality on their own, the ability to override the "Only Build Pull Requests" setting is now supported by the platform. Specifically, CircleCI will run validation on all commits from additional, non-default branches that are specified via regular expression (ie. "release.*")
At the moment, the only way to enable this functionality is to open a support request at https://support.circleci.com/. In the request, please specify the regular expression(s) that you would like to add to the "allow-list" of branches for which CircleCI will validate every commit. You must also submit a support request to remove or edit the regular expressions that are applied to your organization.
We are aiming to deliver this functionality in a self-serve way shortly to eliminate the need to submit a support request. I will update this post when I have more details.
D
D'Aquino Aldo
Sebastian Lerner: Any update to share about the self-serve?
S
Sebastian Lerner
D'Aquino Aldo: No updates to share at this time unfortunately.
S
Sebastian Lerner
Self-serve via API details here: https://discuss.circleci.com/t/product-launch-override-only-build-prs-setting/47807
Maciej H
This and https://circleci.canny.io/cloud-feature-requests/p/trigger-new-build-when-a-pull-request-is-opened are here for nearly 4 years as top-3 voted requests.
How come they have not been addressed yet?
M
Marc Rollin
Quite limiting to not have this option. Otherwise provide workflow conditional condition with PR information.
Roy Robinson
can i plz haz feature
Cristian Pop
I guess this limitation comes from the branding, it's CircleCI not CircleCI/CD
Roy Robinson
Cristian Pop: щ(゚Д゚щ)
Emil Ong
I noticed that Circle added this logic functionality a few months back and I'm wondering if it could be used to implement this.
Seems like the main thing missing (possibly just from my knowledge!) is a way to detect if a pipeline came from a pull request or not.
---
workflows:
conditional-workflow:
when:
or:
- << pipeline.vcs.is_pull_request >>
- equal: [main, << pipeline.git.branch >>]
- equal: [production, << pipeline.git.branch >>]
jobs:
- job-on-condition
Is a variable like
pipeline.vcs.is_pull_request
already available and if not, could Circle add one?A
Arjan Keeman
Gabriel Simmer I think this is a common pattern. Don't you think it's time to implement it after years of waiting?
Load More
→