JenkinsTracker
jenkins_tracker
is a command line utility packaged as a RubyGem that integrates Jenkins build information with
the relevant Pivotal Tracker stories within a project.
This utility makes some very specific assumptions about your Jenkins environment:-
Git as your SCM via the Jenkins Git Plugin.
The Jenkins build changelog file is available at
$JENKINS_HOME/jobs/$JOB_NAME/builds/$BUILD_NUMBER/changelog.xml
. The changelog contents look like this example.Ability to execute Ruby 1.9.x scripts.
Environment variables exists for
$JENKINS_HOME
,$JOB_NAME
,$BUILD_NUMBER
&$BUILD_URL
.
The following are required for your Pivotal Tracker project:-
- API access enabled (enabled by default).
Installation
Add this line to your application's Gemfile:
gem 'jenkins_tracker'
And then execute:
$ bundle
Or install it yourself as:
$ gem install jenkins_tracker
Usage
# Assuming environment variables for $JENKINS_HOME, $JOB_NAME, $BUILD_NUMBER & $BUILD_URL exists
$ bundle exec jenkins_tracker integrate --tracker-token ABC123456 --tracker-project-id 123456
# => Successfully integrated Jenkins Job ($JOB_NAME) with Pivotal Tracker Project (123456)
This utility could be run as a Post Build Action
in Jenkins:
The integration will result in comments being added to the relevant Pivotal Tracker stories:
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request