Replace this template with your information
Describe your question in as much detail as possible:
Hi there- Is there a way to run/execute a job only if the previous one had failed? Basically we went a “rollback” job to run to rollback a deployment if the testing job has failed.
What version are you on? Are you using self-managed or GitLab.com?
/help): Using a self-managed version GitLab Enterprise Edition 13.0.8-ee
- *Runner (Hint:
/admin/runners): Using self-managed runners
- GitLab (Hint:
Add the CI configuration from
.gitlab-ci.ymland other configuration if relevant (e.g. docker-compose.yml)
- echo “deploy”
- echo “testing”
when: step-2 has failed with exit code 1
- echo “rollback”
- What troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?
Thanks for taking the time to be thorough in your request, it really helps!