Do not retry jobs multiple times when retrying a pipeline
What does this MR do?
This MR fixes the process of retrying a pipeline.
When someone wants to retry a pipeline, only the latest relevant jobs should be retried.
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Tests added for this feature/bug