Add job to rebase branches on main

What does this MR do?

A simple automation to allow us to rebase main on top of branches each time a commit is made in main.

It's currently needed in order to rebase feature/fault-tolerance regularly. Together with !5489 (merged) we can do the following workflow:

gitGraph
    commit id: "HEAD"
    branch "feature/fault-tolerance"
    checkout main
    commit id: "New commit"
    checkout "feature/fault-tolerance"
    commit id: "Fault tolerance implementation"
    checkout main
    checkout "feature/fault-tolerance"
    merge main id: "Rebase new commit from main"
    commit id: "New commit rebased on fault tolerance"
    commit id: "Deploy to Kubernetes" type: HIGHLIGHT

This gives us the opportunity to test different features in case we don't want them merged into main yet.

Why was this MR needed?

What's the best way to test this MR?

New pipelines from this branch can be ran with CI_COMMIT_BRANCH and CI_COMMIT_REF_NAME set to main.

This is a pipeline where the correct jobs structure can be seen (rebase job exists)

https://gitlab.com/gitlab-org/gitlab-runner/-/pipelines/1754544839

And this is an isolated pipeline where the job passed: https://gitlab.com/gitlab-org/gitlab-runner/-/pipelines/1754544790

What are the relevant issue numbers?

Related to [K8S Dogfooding] Use the fault tolerance featur... (#38458 - closed) • Georgi N. Georgiev | GitLab • 17.11

Edited by Georgi N. Georgiev | GitLab

Merge request reports

Loading