Deploy to server only if previous jobs are successfull
The Jobs deploy_to_*
should only run if all previous are successful
.add_ssh: &add_ssh
...
when: on_success
The add_ssh
chunk is used in all deploy-jobs (production and staging) so this is the preferred place to put it.
Edited by Jochen