The provisions of sections 580.08, 580.09, 580.12, 580.22, 580.25, and 580.27, so far as they relate to the form of the certificate of sale, shall apply to and govern the foreclosure of mortgages by action.