Myrrhman
Myrrhman

Reputation: 47

Create Jenkins Job when a new GitHub Repository is detected

If a specified user/organization creates a new repository, is there a way for Jenkins to make a job based on some form of template?

Upvotes: 1

Views: 145

Answers (1)

Gerold Broser
Gerold Broser

Reputation: 14762

See GitHub Webhooks, Events:

| repository | Any time a Repository is created, deleted (organization hooks only), made public, or made private. |

See Jenkins Plugin: create a new job programmatically or Remote access API:

Remote API can be used to do things like these:

  1. ...

  2. ...

  3. create/copy jobs

Open http://Your Jenkins/api for further information:

Create Job

To create a new job, post config.xml to this URL [http://Your Jenkins/createItem] ...

See also Job Generator Plugin:

This plugin is a good fit for generating pipelines based on parameterized templates.

Upvotes: 1

Related Questions