Ability to show custom build information/summary
Ability to show custom build information/summary
(like jenkins Description Summary)
Use case 1: In a job I do a (temporary) deploy for each feature branch. The result of it is running service (or several services) on a custom endpoint(s). It's hard to me to look in the build "trace" the particular link.
It could be see in a Build Sidebar
Use case 2: Have a job for linting a code and/or code coverage and/or doc generation. The result of this is a web page. I would like an easy way to follow generated websites. Notice that this website has particular endpoint - custom to the build ID, pipeline ID and/or branch.
Thinking generally, it should be any kind of job summary (or delta to previews jobs run):
- coverage
- footprint
- test time (or delta) it is not same as job time.
- outrage time (during deploy)
- ...
Jenkins has this functionality by Description Setter or by API:
curl -s 'https://jenkins.example.com/job/abc/68/submitDescription?description=my+custom+description'
Proposal
We can consume a markdown file generated by job and show it under the commit or merge message (or it should be showed in sidebar of individual jobs).
Technical details
The summary could be placed to the artifacts and specified the file in .gitlab-ci.yml
to get Gitlab know which file in artifacts to show.
Or use special particular file on filesystem, e.g. in job just create the file: echo '[My link](http://example.com)' > .gitlab-ci-results.md
.
Nice to have (and more general solution)
Generally it would be nice to be able to merge this king of results to stage summary and even pipeline summary.
Furthermore I suggest in #18041 another important thing to return from gitlab runner.
So maybe general .gitlab-ci-results.yml
should be consumed by gitlab-ci-multirunner after the job finished. It could use several keys:
-
result
- Passed, Failed, Skipped (and maybe Pending) see issue gitlab-ce#18041 -
build_summary
- with subkeyrow
for direct markdown string, orartifact_file
to specify file in artifacts -
build_tooltip
- to show tooltip on job on pipeline page
The open question is how to solve summary in stage#show view and pipeline#show views.
Maybe use some template? i.e. any of the jobs define key stage_summary
and/or pipeline_summary
which is an markdown template which can consume key/variables from all jobs results (.gitlab-ci-result.yml
). But it increases the code complexity.
The easiest way (but not nice):
-
stage_summary
- similar tojob_summary
, but all the summary jobs are contacted together. -
pipeline_summary
- similar tojob_summary
, but all the summary jobs are contacted together. and similar forstage_tooltip
.
~"feature proposal" ~CI