For my workplace I’m evaluating GitLab as a potential alternative to our current git/Jenkins setup. I am using free gitlab.com for this (my trial just expired, but I guess that’s not of influence). We develop embedded systems in C++, so we’re interested in tracking binary size after compiling.
In order to track this in GitLab, I thought I would use the metrics.txt file.
I have added a static metrics.txt file to our repository containing originally these contents:
In the .gitlab-ci.yml file I added this to the build stage of the pipeline, with 2 spaces before reports and 4 spaces before - metrics…:
- metrics: metrics.txt
The original merge request with these additions showed 2 new metrics as expected. I merged the branch into master.
Then I created a new branch from the updated master, and proceeded to update metrics.txt. After the build stage the metrics.txt file now reads (verified by cat-ing it in the pipeline):
I would expect that a merge request of the new branch would show new metrics and their values. Instead it shows “Metrics reports did not change”.
I’ve tried to use an example prometheus file (from the help pages) to see if bad formatting was to blame, but it showed no difference in behavior.
I saw online that in the past there were issues with refreshing the merge request, with cache overriding, so I tried that a couple of times. No difference in behavior.
I am wondering if I’m encountering a bug, or if this is caused by something I’m doing (and what)?