The gitlab-runner systemd service from the offical package performs a force shutdown when stopping the service (SIGTERM) resulting in the abortion of all running build jobs. This behaviour can be changed to a graceful shutdown by using a SIGQUIT as the services KillSignal instead. Since most build jobs aren’t finished within 2 minutes (systemds default), TimoutStopSec needs to be set to something sensible.

[Service]
KillSignal=SIGQUIT
TimeoutStopSec=2h

A list of supported signals can be found in the official documentation

Note. It’s also possible to configure a graceful shutdown on service restart only by setting the RestartKillSignal.