I'm trying to configure our Jenkins server via Groovy init scripts. I'm stuck on how to configure the Github Plugin. I want Jenkins to manage my hooks. So I need to add a GitHubServerConfig to the GitHubPluginConfig somehow. I already managed to set up the credentials. So I have this code so far:
import org.jenkinsci.plugins.github.config.GitHubPluginConfig import org.jenkinsci.plugins.github.config.GitHubServerConfig def github = new GitHubPluginConfig() github.setConfigs([ new GitHubServerConfig("github-access-token"), ]) github.save() But this doesn't have any affect. Any suggestions?