Master branch changes while running CI - how to avoid restarting CI? (git methodology question)

Viewed 37
  1. User is working on his feature branch.
  2. When his feature is ready, he merges/rebases from the master branch to his branch, to make sure that all changes done by other developers are incorporated into his branch.
  3. User runs a GitLab CI pipeline to make sure that his changes are ready for merging to the master.
  4. However, his CI pipeline is quite long running (30 min?), and in the meantime other developers merge their changes into the master. As a result, by the time his pipeline completes, his branch is out of sync with the master again. (needs to re-fetch and rerun pipeline).
  5. We don't have a dedicated integrator, who would control the traffic to the master.

Currently the workaround is setting up time slots on a shared calendar, when each developer may merge to the master. This is inefficient and not elegant.

What might be a better solution?

Note: we're considering "Merge Trains", but this is a premium feature and it has it's own drawbacks.

0 Answers
Related