gitlab generates duplicate jobs on tag + branch push, make gitlab smarter
After making changes to master, and also tagging this last commit (for example adding the version number to a file, committing this file, and tagging the result) gitlab will create two pipelines based on this.
Another example, is that I have a CI job, that if I put a tag on master (can't exactly do this due to gitlab-ce#27818 so do an except branches) (where the tag is limited to ^v\d+(.\d+)$ (e.g. v0.10) a release branch is created, stable/v0.10/. In combination with this branch, we also create the initial tag, be it v0.10.0 or stable/v0.10.0. Also here, two jobs are created, one for the branch, one for the tag.
Gitlab could be smarter when the same commitish ends up in the pipeline. For example, if pipeline1, job1 finishes, and the same job is scheduled as pipeline2, job2, gitlab could be smarter and mark job2 as completed.
The heuristics herein may be a little harder for complex cases, but making a start to improve the smartness would be nice :)
Think Docker caching layers?