On Tue, Oct 24, 2017 at 11:08 AM, Carles Capdevila Tejada
<
capde...@gmail.com> wrote:
> I read in the docs that to implement the automatic
> triggering of jobs when pushing to the SCM a webhook should be implemented.
> However, I’d like to re-use the webhook of the Git Plugin to do this.
Sure. `github-branch-source` does this. Study it as a kind of
reference implementation, as well as
https://github.com/jenkinsci/scm-api-plugin/blob/master/docs/implementation.adoc
> Right now the Gitblit organization projects are not detected by the Git
> “notifyCommit” webhook given that they are WorkflowJob’s and their getSCMs()
> method does not see any checkout in the previous builds.
You mean, you have standalone Pipeline projects using this SCM. That
is very different from implementing `SCMSource` + `SCMNavigator`.
> What's more, it seems that the Git hook only acts on the branches already
> scanned in Jenkins, so it doesn't seem posible to trigger a scan when a new
> repository/branch is created and pushed into in Gitblit.
So long as Gitblit sends some kind of event when a branch is created,
you should be able to listen to that event.