Added support for sorting of deployment in deployment phase.