Complex sentence: Gallery barely escaped court-martial, but the articles cost him his promotion to vice admiral and ultimately ended his career.
Split into simpler sentences: Gallery barely escaped court-martial. Although Gallery was not court-martialed, the articles cost him his promotion to vice admiral and ultimately ended his career.