Skip to content

Added generic report type to report artifacts

What does this MR do and why?

This merge request adds a new artifact report type: generic

This artifact report type is designed to be a catch-all for messages developers might want to display on their pipelines or on their merge requests.

These are usually the result of custom jobs that don't fit any of the already existing report types.

This report type can also be used to rapidly prototype new reports and build widgets on them.

This MR is the backend and documentation change only. A frontend change that introduces a new generic report MR widget will follow later.

Related to: #368814 (closed)

Open parts:

  • Collating messages from different jobs. Done on Backend or Frontend?
  • Message format spec. Should allow severity levels and details

How to set up and validate locally

  1. Create a .gitlab-ci.yml file using the new report type:
build:
    image: busybox
    script:
        - 'echo "{ \"messages\": [] }" > gl-generic-report.json'
    artifacts:
        reports:
            generic: gl-generic-report.json
  1. See that the pipeline is successfully created and the artifact uploaded

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Output of db migrations

Migrate

main: == 20220727111511 AddPlanLimitsMaxSizeGenericReportColumn: migrating ==========
main: -- add_column(:plan_limits, :ci_max_artifact_size_generic, :integer, {:null=>false, :default=>0})
main:    -> 0.0020s
main: == 20220727111511 AddPlanLimitsMaxSizeGenericReportColumn: migrated (0.0023s) =

Rollback

main: == 20220727111511 AddPlanLimitsMaxSizeGenericReportColumn: reverting ==========
main: -- remove_column(:plan_limits, :ci_max_artifact_size_generic, :integer, {:null=>false, :default=>0})
main:    -> 0.0017s
main: == 20220727111511 AddPlanLimitsMaxSizeGenericReportColumn: reverted (0.0038s) =
Edited by Felix Winterhalter

Merge request reports

Loading