Git integration for Mingle in the cloud!

scaling
Posted by Melissa

2 June 2014

Connect your Git repo(s) to murmur your commits

We’re happy to announce Mingle in the cloud now offers native support for Git integration. This integration allows your Git commits to be pushed as murmurs to your Mingle project under the murmurs tab and, when you mention the card number in your commit message, the individual card as well.

Also, with the recent work we did around murmur love, if you murmur at @someone, @team, or @group in your Git commit message, they’ll also receive an email notification!

Lastly, you can integrate multiple Git repos to a project! (Currently, however, we don’t offer support for integrating a single repo with multiple projects.)

Requirements

  1. Git server repository on UNIX/Linux OS
  2. Ruby 1.9+, and rubygems. (If you need it on ruby 1.8, contact our Support team so we can fix it.)

Steps

  1. Create a new user in Mingle for the Git integration (N.B. Only Mingle admins can create new users.)
    • Suggested username: Git
      • (We suggest this so the murmurs will appear under a “Git” heading.)
    • Suggested login: “git” or project specific name.
      • (For example, we want to integrate git with project “mingle,” so I use “mingle_git” as this user’s login name.)
  2. Assign the user to the project you want to integrate with your Git repository
    • Go to the new user’s profile page
    • Open the HMAC Auth Key tab and generate a new HMAC key (N.B. Only Mingle admins can generate an HMAC key for other users.)
    • Keep the downloaded credentials as you’ll need them later to configure your Git repository
  3. Log on to your Git server
  4. Install ruby gem “murmurs” as root
  5. Install Mingle Git integration hook by typing the following command (you may need to execute as the user having write permission to the git repository path):
    • murmurs -a [your git repository location]
    • Note: In some OS ruby 1.9, the script may be renamed murmurs 1.9
  6. In your Git repository, setup the following configs:
    • git config hooks.minglemurmursurl “https://your-site.mingle-api.thoughtworks.com/api/v2/projects/your-project/murmurs.xml”
    • git config hooks.mingleaccesskeyid [your git integration user access key id]
    • git config hooks.mingleaccesssecretkey [your git integration user access secret key]

Test your Git Integration

If you want to try out the integration before running it on your production Git server, you can use the following to get a feel for how your Git server will integrate with your Mingle project. (Please install murmurs gem, and get all configurations mentioned above ready before you start.)

  1. Create a local git repository
    • cd /tmp
    • mkdir mingle_test
    • cd mingle_test
    • git init —bare
  2. Setup murmurs git integration
    • murmurs -a /tmp/mingle_test
    • cd /tmp/mingle_test
    • git config hooks.minglemurmursurl “https://your-site.mingle-api.thoughtworks.com/api/v2/projects/your-project/murmurs.xml”
    • git config hooks.mingleaccesskeyid [Mingle user access key id]
    • git config hooks.mingleaccesssecretkey [Mingle user access secret key]
  3. Clone a local test repository
    • cd /tmp
    • git clone mingle_test mingle_test_local
  4. Make an empty commit and push to origin master to trigger post-receive hook on origin repository
    • cd mingle_test_local
    • git commit —allow-empty -m “hello world, this is git mingle integration test”
    • git push origin master

comments powered by Disqus