President Trump signed a funding bill that keeps the government open through September, averting a shutdown after a drama-filled week on Capitol Hill.