0

How do I set up Jenkins so that every time a developer creates a new repo on Github within the organization, Jenkins is able to access it? So that the developer DOES NOT need to go into the repo's setting page on Github to find the right webhook, deploy keys, or integration & services.

For example, after a developer creates a new repo on Github (where the owner is the organization), I want the developer to be able to do the following on Jenkins:

  • Developer goes to our Jenkins website (which runs off Kubernetes/Helm), creates a new Jenkins project, clicks "Add Source", selects "GitHub" or "Git" for the source (whichever works), and Jenkins is able to find that repo and trigger builds/tests based off commits to that repo

Jenkins is already able to do this for public GitHub repos, because when I type in the username under Owner, the Repository drop down updates with a list of repos. (See screenshot) But I want to be able to do this for a private organization.

For example, when I type in tensorflow as owner: enter image description here

1
  • I was searching for something same but probably one step beyond, like Developers don't want to create Jobs in Jenkins after creating a new repo in GitHub but Jenkins should detect it from Jenkins file and create a job based on the file. Let me know if you find any useful info in your search. Oct 23, 2017 at 20:20

1 Answer 1

2

You will need to tell Jenkins about your GitHub OAuth token, as described in the GitHub plugin manual; there is a dedicated section on that page for how to tell Jenkins to auto-add itself to the GitHub repos

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.