How can I make to be continuous jobs interruptible?
And by the way, why isn't it the default behavior ?
The jobs can be made interruptible simply by overriding the job(s).
For example, here is how to make one single job (mvn-build
) interruptible
:
mvn-build:
interruptible: true
And here is how to make all Maven template jobs interruptible
(using the base job .mvn-base
):
.mvn-base:
interruptible: true
If two branches are merged at the same time, the first resulting pipeline will be cancelled. If the second one has failing tests you won't know which merge was the root cause. This will require some digging to know where the error lies. Our opinion is that developer's time is more valuable than GitLab CI's so we prefer let him do the extra work by default.