Cole Hamels signed a one-year deal with the Dodgers through the end of the season, adding more depth to a pitching staff that has been racked with injuries.