Madison Bumgarner and the San Francisco Giants have agreed to a new six-year contract through the 2017 season, locking up the lefty through his arbitration seasons and his first year of free agency.