Posts tagged 'git'

Jenkins CI and GitHub post-receive hooks ceasing to work (+ potential solution)

All projects fail

Recently our Jenkins CI system began having issues with failing to correctly accept post-receive hook POST requests from GitHub, even though it was working fine. Without thorough testing, I can only really see that the issue was related to upgrading Jenkins and/or the relevant Git and GitHub plugins. Thankfully, with even newer versions of the above, it has started working again. So, to those with issues, I offer this KGS (Known Good Set) of versions for your help:

  • Jenkins 1.470
  • Jenkins GIT plugin 1.1.19
  • github-api 1.28
  • GitHub plugin 1.4

Some projects …

Notes about Redmine and GitHub Post-commit Hooks

We’re currently using Redmine for our project tracking and recently have wanted to have our GitHub projects automatically get updated within Redmine. A post-commit hook to the rescue!

  1. Download and install this super plugin: https://github.com/koppen/redmine_github_hook and restart your Redmine instance.

  2. Set up your local Git instance for your repository.  This is simple, but you need to follow these steps or else pulling your changes down won’t work:

    git clone --bare git://github.com/davidjb/123.git
    cd 123.git
    git remote add origin git://github.com/davidjb/123.git
    
  3. Configure your Redmine project’s …

Git and checkouts by date

Cheers to this very handy post for posting details from Nabble on how to check out a git branch based upon the date it was commited.  If I haven’t modified Wordpress to turn off the character replacement, then watch out because the double-quotes and double-dash will need to be checked before running the command:

git checkout `git rev-list -n 1 --before="2009-07-27 13:37" master`

A very easy way to flick back to a given revision.