We own a Github organization with hundreds repositories that are authored by contributors. We would like to setup a Jenkins server that performs certain standard tasks for e
I am not sure how much of this answer will help you, but I will be happy even if it provides some insight into Jenkins pipelines.
I am elaborating the procedure to follow using Jenkins pipelines, if not now at some point of time you need to move your build and deploy to pipelines for Infrastructure as code.
Starting with Jenkins plugins, the following are mandatory plugins for the procedure that I will be explaining here:
Jenkins Configuration
Github organization
from the options below:Owner
should be your Organization
where hundred of repos are available.also, configure what file and what branches to look into a repo to trigger a build. script path
is the file that does the steps (probably build and deploy) for the repos. So all the repos will be detected or shown in Jenkins only if a file with this name is available in the repos.
Jenkins scans the configured organization as per the interval mentioned here. It detects any additions/deletions of repos and also commits. Good to configure numbers of builds to store, as needed.
Git repo/organization configuration
Configure webhooks in github
Configure the events that require notifications to Jenkins.
Branch protection and status checks for PRs
Protecting the branch by enabling proper checks will help to restrict commits from a few sets of people after status checks are passed. This helps to maintain good code quality.
Here is the snapshot that shows the status checks status when a PR is raised. Based on this reviewers will be able to decide for approving the PR.
This link explains in detail about the procedure that I have described here.
https://github.com/gitbucket/gitbucket/wiki/Setup-Jenkins-Multibranch-Pipeline-and-Organization