Installing GitHub Webhooks from TeamCity
Since TeamCity 10.0 it has become possible to use commit hooks with a TeamCity server. Now, when a VCS change is detected via a commit hook, TeamCity automatically increases the VCS repository polling interval, reducing the load on both the TeamCity server and VCS repository. And obviously the presence of the hook greatly decreases the time needed to detect a change.
Unfortunately, installation and configuration of commit hooks is not an easy task and for on-premises VCS repositories it requires administration skills. At the same time, popular VCS hostings such as GitHub, support installation of commit hooks via their REST API, and installation of commit hooks for them can be a lot simpler, provided that we use such an API from TeamCity…
So today, we’d like to announce one more TeamCity plugin whose task is to install and maintain GitHub commit hooks (do not worry, we plan to add support for other VCS hosting services too).
The plugin supports both GitHub.com and GitHub Enterprise. The plugin does not install a webhook automatically for GitHub.com because a webhook requires a connection from GitHub.com to the TeamCity server, and in the majority of cases, when TeamCity is installed in the intranet, such a connection is blocked by a firewall. In case of GitHub Enterprise, the plugin will install a webhook automatically for any TeamCity project created from a URL or via GitHub integration.
The plugin works with the GitHub REST API and has to make API calls to GitHub on behalf of the current user, so it requires a GitHub connection configured in the project or its parent.
The plugin is quite simple, basically it does three things:
- It shows a suggestion to install a GitHub webhook if it finds a GitHub repository in a project without such a webhook:
- It provides a new action in the project actions menu for webhook installation enabling you to install or reinstall a webhook at any time:
- It checks the status of all of the installed webhooks and raises a warning via the health report if some problem is detected:
The plugin is open source, distributed under the Apache 2.0 license. Most of the code is written in Kotlin. The source code is published on GitHub.
Subscribe to Blog updates
Configuration as Code for TeamCity Using Terraform
We're introducing Terraform Provider for TeamCity, an new way for configuring your CI/CD infrastructure as code.
Critical Security Issue Affecting TeamCity On-Premises (CVE-2024-23917) – Update to 2023.11.3 Now
Summary A critical security vulnerability was identified in TeamCity On-Premises (initially discovered and reported by an external security researcher on January 19, 2024). This critical security vulnerability has been assigned the CVE identifier CVE-2024-23917 and presents the weakness CWE-2…
New in TeamCity: Remote Parameters and Updated HashiCorp Vault Plugin
We're introducing a new Remote type of parameters. Based on the new parameter type, we've also updated the HashiCorp Vault plugin, making it easier to use. Read on to learn what's new.