Refactor how the plugin stages are called

At the moment the complete stag doesn't actually have access to whether the build has passed or failed. This change means the step is executed after the status has been set,

I've also taken the opportunity to switch some magic numbers used to the correct constants.