Implemented basic support for Matrix projects.

This change adds support for Matrix projects.

[JENKINS-15396]