Git & SVN (R6) – iceScrum

Obsolete iceScrum documention (R6#14+) This documentation applies only to old iceScrum R6. For new iceScrum v7, click here.


We think that it is important for your team to stay up to date with the latest developments without leaving iceScrum. iceScrum Pro provides integration for the most popular Source Code Management (SCM) tools: SVN and Git. We also provide integration for GitHub.

You may also be interested in the Continous Integration feature.

Principles

In iceScrum, activities that involve source code update are represented by tasks. iceScrum Pro gives you the ability to link your commits to the tasks you are working on. Thus, in your iceScrum tasks, information about the corresponding commits (message, author, files involved) is displayed in a dedicated tab.

Link commits and tasks

Assuming that I am responsible of the task 80: “Add the Car domain”, here is my commit message with no SCM integration:
New car domain class.

In iceScrum Pro, I would write one of the following (these examples are equivalent):
T80 New car domain class
New car T80 domain class
New car domain class T80

Then, the information about my commit is sent to iceScrum and displayed in the “Task details” view:

You will find the following information for each commit:
Author: if the commit author is recognized in iceScrum (username, full name, email) then the commit is associated with the corresponding iceScrum user.
Message: tasks identifiers are removed from the original message to make it more readable.
Date: the commit date.
Files: the files added (+), removed (-) and modified (~) in your commit.

You can mention as many tasks as needed in your commit message:
New domain class: supplier T70 T72 T73

Commits and stories

In the iceScrum “Story details” view, commits associated with all the story’s tasks are displayed in the commit tab.

Update task's remaining time

You can optionally set the task’s remaining time in your commit message. Consequently, the full task pattern is: T<taskUID>[-<taskEstimation>]

In this example, I want to set the remaining time for task 70 to 1 hour and a half and that for task 72 to 3 hours. Moreover, there is no work left on task 73 so I set the remaining time to 0. The corresponding commit message is:
New domain class: supplier T70-1.5 T72-3 T73-0

In iceScrum, the remaining time is updated for the corresponding tasks. You will notice that task 73 is considered as done and has been moved to the “Done” column:

Rules for task update

– A task is updated if it isn’t “Done” and if the sprint is in progress.
– If the remaining time is positive or not specified and the task is “Todo” then the task is moved to “In Progress”.
– If the remaining time is positive then the task’s remaining time is updated.
– If the remaining time is set to 0 then the task is moved to “Done”.

Configuration

This section describes how to configure the integration with your SCM tool. By default, SCM integration is disabled in iceScrum. At any time, you can enable / disable the SCM features by editing your project settings:

Web services are required so they are enabled automatically when you enable CI integration.

Git

To connect your Git repository to the corresponding iceScrum project, you have to add a post-receive script in the YOUR-REPO/.git/hooks/ directory.

You can write your own script but we recommend using this one: post-receive. This script hooks into pushes received by a Git repository.

It requires Ruby and Rubygems (grit and json gems):

$ sudo apt-get install ruby-full
$ sudo apt-get install rubygems
$ sudo gem install grit
$ sudo gem install json

Additionally, you have to give it execution rights:

$ chmod +x post-receive

Then, you have to configure the connection to iceScrum by using the git config command in your repository:

$ git config icescrum.url "http://www.example.com/icescrum/"
$ git config icescrum.project "MYFIRSTPROJ"
$ git config icescrum.username "johndoe"
$ git config icescrum.password "wsdopjfwnsd"

You can optinally configure the Git URL if you use a web-based tool:

$ git config icescrum.giturl "http://localhost:3546/gitweb/"

This example sets the configuration only for the current repository (settings are written in the .git/config file). If you want to apply them to all the current user’s repositories then use the global option (global settings are written in the ~/.gitconfig file).

SVN

To connect your SVN repository to the corresponding iceScrum project, you have to add a post-commit script on your server, in the YOUR-REPO/hooks/ directory.

You can write your own script but we recommend using this one: post-commit.

This script requires Ruby and a Rubygem (json):

$ sudo apt-get install ruby-full
$ sudo apt-get install rubygems
$ sudo gem install json

Additionally, you have to give it execution rights:

$ chmod +x post-commit

Then, you have to configure the access to iceScrum by editing the script:

icescrum_url = "http://www.example.com/icescrum/"
pkey = "MYFIRSTPROJ"
username = "johndoe"
password = "wsdopjfwnsd"

You can optionally configure the SVN URL if you use a web-based tool:

svnviewer_url = "http://svnviewer/svn-history/"

GitHub

We defined a GitHub Service Hook for iceScrum. You should find it in the “Settings” panel of your GitHub repository, listed under the “Webhooks & Services” tab. In the “Services” panel, click on “Add services” and choose “iceScrum”.

Choose the iceScrum GitHub Service

To connect a GitHub Repository to an iceScrum project, you have to fill the following fields:
Base URL: the URL of your iceScrum server (http://www.example.com/icescrum). This input is optional. If not set, “https://www.icescrum.com/a” is used for iceScrum Pro Cloud customers.
Project Key: the project key you defined for your project.
Username: the username of one team member in the project (e.g. the ScrumMaster).
Password: the password of the team member you defined above.
Active: the service hook is active only if “active” is checked.

Configure the iceScrum integration

Custom endpoint call / GitLab

If you want to make your own hooks, here is the data format expected by iceScrum (JSON):

{
	commits: [
		{
			"id": "41a212ee83ca127e3c8cf465891ab7216a705f59",
			"url": "http://github.com/defunkt/github/commit/41a212ee83ca127e3c8cf465891ab7216a705f59",
			"author": {
			    "email": "chris@ozmm.org",
			    "name": "Roberto Doe"
			},
			"message": "New car domain class T87",
			"timestamp": "2012-05-02T14:57:17-09:00",
			"added": ["Car.groovy", "CarTest.groovy"],
			"modified": ["User.groovy", "UserTest.groovy"],
			"removed": ["unused.groovy"]
		},
		{
			"id": "41a212ee83ca127e3c8cf465891ab7216a705f59",
			"url": "http://github.com/defunkt/github/commit/41a212ee83ca127e3c8cf465891ab7216a705f59",
			"author": {
			    "email": "chris@ozmm.org",
			    "name": "Antonio Doe"
			},
			"message": "Car service T81",
			"timestamp": "2012-05-03T16:12:07-01:00",
			"added": ["CarService.groovy"],
			"modified": [],
			"removed": []
		}
	]
}

It must be submitted either as a POST body, in which case your must provide the application/json Content-Type header, or as the value of a parameter named payload.

Assuming that you have a project with the key MYPROJECTKEY, the endpoint URL is the URL of your iceScrum server followed by:
/ws/p/MYPROJECTKEY/commit/save

You must provide HTTP Basic authentication (either via the HTTP header or at the beginning of the URL like so http://username:password@…) with the credentials of an iceScrum user who has access to the project.

This endpoint is compatible with GitLab webhooks: http://docs.gitlab.com/ee/web_hooks/web_hooks.html.


Try it for free now
All you need for your Agile project management