Allow manual branch builds without enabling automatic branch builds?

I’m using the REST API to allow engineers to trigger builds manually on branches that have been pushed up stream and I’ve run into what I think is a conundrum.

In one of my pipelines I have Build branches unchecked. This is because builds are big on this pipeline and building every branch push is cumbersome. That option’s description says, “Automatically run builds when branches are pushed to your repository.” – great! I do not want to automatically run builds when branches are pushed.

BUT people attempting to use the REST API to start a manual build of this pipeline are encountering an error response from the API. They’re getting:

{"message"=>"Branches have been disabled for this pipeline"}

as the response.

Can I not disable automatic branch builds but still trigger manual branch builds for a pipeline? If so, what’s the missing option here to allow manual branch builds to work when automatic branch builds are disabled?



Hi @ian-persona

Thank you for reaching out us with your question. Yes, there is an option for this which is to set “ignore_pipeline_branch_filters”: true in the request body of the REST API call for create builds which will run the build regardless of the pipeline’s branch filtering rules.

Please let us know if you have any questions. Thank you

1 Like

Thank you @suma! That was exactly the piece I failed to connect to make this work.