jenkinsci/git-plugin — pull request #145 by coreyoconnor (2013-04-07 04:55:04+00:00)
Title: add test verifying GitPublisher functionality with MultiSCM plugin

Suppose a user creates a project that:

* uses the MultiSCM plugin for the SCM
* has one or more git SCMs added to the project using the MultiSCM instance
* all remotes in the git SCMs have unique names or no name at all
* EG: Two git SCMs with one remote each. First remote named "repo_0" and second "repo_1". Both configured to check out the master branch.
* has the git publisher configured to push the master branch of the remote "repo_0"

From a user perspective, this is a reasonable combination. The information provided to the git publish seems unambiguous.

The actual result is:
* when configuring the Git Publisher the check for a valid remote fails with a 500.

org.jenkinsci.plugins.multiplescms.MultiSCM cannot be cast to hudson.plugins.git.GitSCM

* when running a job the job is failed due to

Build step 'Git Publisher' marked build as failure

The reason is that GitPublisher only works with a SCM of type GitSCM. The perform procedure fails because this check fails.

commit
1. adds a test that fails due to above issue
2. additional logging indicating the GitSCM only check failed.

I have a partially working resolution which adds a common interface to MultiSCM and GitSCM. I'm not
sure if there is a better solution or not.