alls well that ends well

Alls well that ends well is referring to a risky enterprise that is justified as long as it turns out well in the end. This can be used for a variety of different situations and circumstances in which the process or situation itself seems like an extremely risky endeavor with many trials and tribulations, but so long as the end result is the desired result and that it will turn out good in the end, it will be worth it.