GitHub repo configuration for PR and CI?

28 views
Skip to first unread message

Antoine Musso

unread,
Apr 17, 2024, 10:22:24 AM4/17/24
to jenkin...@googlegroups.com
Hello,

I have been added as a developer for the Collapsible Console sections
plugin (repo:
https://github.com/jenkinsci/collapsing-console-sections-plugin ) and I
am trying to enhance the project configuration in GitHub.

I would like to ensure CI passes before a pull request is merged. To do
so, I have added a rule to request the change to be updated (== rebased)
and for CI to be passing. However when doing a maven release:perform,
the git push is refused since CI hasn't had a chance to complete yet.  I
have thus removed the rule.

I am now wondering how to configure the repository to ensure CI passes
before a pull request is merged and thus avoid a potential regression
when a pull request did not get rebased and conflicts with another that
got merged since then.

Is there a tutorial or a recommended way to configure the GitHub
repositories for plugins development?

Antoine "hashar" Musso
Wikimedia Foundation, Release Engineering

Jesse Glick

unread,
Apr 17, 2024, 12:29:24 PM4/17/24
to jenkin...@googlegroups.com
On Wed, Apr 17, 2024 at 10:22 AM Antoine Musso <has...@free.fr> wrote:
I would like to ensure CI passes before a pull request is merged. To do so, I have added a rule to request the change to be updated (== rebased)

If you mean Require branches to be up to date before merging then I would not recommend it. This defends against a scenario (logical merge conflict without textual merge conflict) which in practice is extremely rare, and tends to interfere with routine work. If you are still concerned, I would rather suggest checking the newer option Require merge queue which offers the same safety without the downsides.
 
when doing a maven release:perform, the git push is refused

Not if you have admin rights to the repo, though you may instead consider https://www.jenkins.io/doc/developer/publishing/releasing-cd/ which would bypass any such issues.
Reply all
Reply to author
Forward
0 new messages