How to publish links to external dashboards in Merge Requests?

Hi folks

We are on Gitlab Premium.

My scenario:

  • We have gitlab pipelines running multiple jobs.
  • Some of these jobs upload data to external database/dashboarding app.
  • These dashboards are used by reviewers to check for regressions, improvements etc.
  • To view the dashboards for the job, the reviewers manually navigate go to the job’s dashboard and fill out details like Job ID and other params etc.
  • URL to the dashboards look like: http://link.to.my.app/<dash-id>?job-id={$CI_JOB_ID};paramX=foo;paramY=100 . i.e. this can be easily generated after the job is executed.

my goal is to provide an easy way for reviewes to access all the dashboards of the pipeline/jobs

Few options I could think of so far:

Option 1:

  • Simplest option is to add the generated dashboard URL to each job’s console output.
  • This kind of work, but still the reviewers need to go to each job and see if they have dashboards.

Option 2:

  • In the jobs, automatically post back a comment to the Merge Request using gitlab API. The comment contains the friendly job name, and URL to the dashboard.
  • This works, but the dashboards are hard to find when interleaved with other comments.

Option 3:

  • In the jobs, update the Merge Request description by appending the dashboards URLs
  • This may works, and keeps all dashboard links in one place as part of the MR description.
  • but the downside is that we might accidentally overwrite the MR description (esp. if there’s “mid-air collision” where the MR author is editing the MR description while the jobs are trying to write to it.)

Help!!

None of the above options are ideal. I was wondering if you had other suggestions on how best to implement this. My gitlab knowledge is very limited.

Thanks