Open tidalf opened 1 year ago
@mvisonneau any chance for this to be merged? 🙏 I have the same problem, latest
gcpe image can't find MR pipeline for the repo with merge trains enabled. Works fine for repos without merge trains.
Yes ! Would be lovely if @mvisonneau can have a look :)
I've just been battling with this issue for quite a while and stumbled into this PR. So this proposal would work for all MRs that have at least 1 regular MR pipeline and 1 MR results pipeline. There's a regex which filters the discovered refs before execution ever reaches the changes in this proposal. Here it is: https://github.com/mvisonneau/gitlab-ci-pipelines-exporter/blob/0687efd1075d33283c3762a135aa24de94ffe21c/pkg/schemas/ref.go#L13
This means that only MR refs with /head
(regular MR pipelines) are considered. Meaning that if you have enabled MR result pipelines, all the refs will be /merge
(with the exception of when there are conflicts, as stated in gitlab docs, search for "conflict").
Here's a git patch in another thread that works for us. This one ensures that both the regular MR pipelines and MR results pipelines are gathered and exported: https://github.com/mvisonneau/gitlab-ci-pipelines-exporter/issues/534#issuecomment-1870465381
This fixes this issue https://github.com/mvisonneau/gitlab-ci-pipelines-exporter/issues/280 for our setup.
Not sure it's fine as is, or if it'd be better to try to retrieve the settings of the project.