6/24/2023 0 Comments Teamcity checkout rules![]() This really comes into it’s own with Pull Requests. The result of this is that your branches, commits and pull requests will be marked as pending, failed or succeeded. One of the coolest features in GitHub is the ability to have your build process report progress to GitHub. Hopefully this will be resolved at some point in TeamCity. Unfortunately TeamCity doesn’t allow you to setup multiple alternative usernames so some of your commits won’t get matches. The only place the above falls down is when you also use GitHub for personal projects and you end up committing with multiple different email addresses by accident because you have a global default set. If the usernames don’t match you can go to your user profile in TeamCity and customise the username that will be associated with all VCS roots, a specific VCS Root or even all Git VCS Roots. We then tend to match our teamcity usernames with our company email address names. This results in the most predictable behaviour as people tend to have various names configured but the email address will probably be quite consistent. This will take the first part of the email configured above and use that to match against TeamCity usernames. In my experience the best thing to do is to leave this setting at the default (UserId). In the Advanced VCS Root settings you will see the following section: Git config user.email next thing to do is to make sure that TeamCity is configured to correctly match this information with your TeamCity user. So the first step is to correctly configure your user.name and user.email git configuration. If however this information is not configured in your account there is no easy way to update this information without rewriting history. GitHub will then do it’s best to show your avatar against your commits and track your stats by looking at your commits. In fact it is up to you to make sure that the correct name and email is configured in the git clone on your machine in order for these commits to be correctly attributed to you. With GitHub and other git services like BitBucket it is important to understand that your GitHub user account is not automatically stamped against each commit that you make. Obviously GitHub and TeamCity have their own lists of users. Matching TeamCity users with GitHub users. Note that now you can create a project from a URL, this is often the easiest way to setup a new project around a GitHub repository. If you haven’t then follow the instructions to get it setup. The first thing you probably have already done is to configure GitHub as a “VCS Root” in TeamCity. This post will concentrate on getting the most out of TeamCity + GitHub You don’t need to be using all these tools and services to get something out of these posts but the combination of all three can be pretty powerful. For a while now I’ve been using the GitHub + TeamCity + Slack combination and I though it would be useful to write down the various tactics and tools for getting the most out of this pretty common configuration of tools.
0 Comments
Leave a Reply. |