I have a pipeline that has two stages, as well as one gitlab runner that I installed on a centos 7 server. Whenever I have two separate repos, and make a commit at the same time with the gitlab cicd file, they both kick off the pipeline. Whichever one was first actually runs the pipeline and the other one is stuck in the pending state. This is good, and is what I want to happen. Whenever the first stage completes for the first repo, it moves on to the second stage. The second repo moves out of the pending state and starts running the first stage. I believe this is expected and default behavior, but that is not good behavior for me. Is there any possible way to make sure that the centos 7 runner forces any pending runs of the pipeline to wait until all stages are completed?
I have played with the idea of having only one stage, but I absolutely must have two stages, as this second stage is configured to run always, even upon failure of the first stage.
Perhaps if there is some option that allows you to always run a set of commands at the end of the stage, that would help me avoid this issue entirely.