A gunman who was filmed firing live rounds into a home in the midst of a gangland war has been jailed for nine years.