Config repository and github webhook

28 views
Skip to first unread message

Marc

unread,
Jun 15, 2023, 2:47:04 AM6/15/23
to go-cd
Hi,
after reading https://github.com/gocd/gocd/issues/8170 I was thinking that the webhook notification for config repositories would work now.
But I didn't get it working.
I've registered the following URL in Github: 
https://gocd.somewhere.org/go/api/webhooks/github/notify?SCM_NAME=<NameOfConfigRepoConfig>
I thought that the "NameOfConfigRepoConfig" would be correct. It was also shown in the logs when the webhook was called, but it didn't start a reread of the config repository. 
When reading the api docs I found the note: "The scm_name is the material name as defined in pipeline material page." But the config-repo isn't listed there. As such I've got no idea what I've got to do to schedule a rescan of the config repository. Or is it still not possible? :(

thanks for your help...
marc

Chad Wilson

unread,
Jun 15, 2023, 10:40:41 AM6/15/23
to go...@googlegroups.com
There might be some confusion here, triggering a config repo material update from a webhook is via webhooks such as

https://gocd.somewhere.org/go/api/webhooks/github/config_repos/<ConfigRepoName>

I believe this has been available since GoCD 21.1.0 (it may work with regular https://gocd.somewhere.org/go/api/webhooks/github/notify type of webhooks too, if you are not trying to do anything fancy like pull request/branch support). The special purpose config repo webhook is possibly not properly documented outside the in-server guidance (see below).

If you expand the config repo in the admin view, GoCD tells you the specific webhook URL to use, e.g with a YAML config repo:

image.png

A "pluggable SCM" is an unrelated concept for source control materials defined via a plugin, rather than built-in GoCD support (git, svn etc). If you have nothing in Admin > Pluggable SCMs then you are not using pluggable SCMs and that part is not relevant to you.

-Chad

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/1cea6e87-72b2-4fad-8d72-8fc7817caeefn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages