CI/CD artifacts reports types | GitLab Docs
/ CI/CD artifacts reports types Tier : Free, Premium, Ultimate Offering : GitLab.com, GitLab Self-Managed, GitLab Dedicated Use artifacts:reports to: Collect test reports, code quality reports, security reports, and other artifacts generated by included templates in jobs. Some of these reports are used to display information in: Merge requests. Pipeline views. Security dashboards . Artifacts created for artifacts: reports are always uploaded, regardless of the job results (success or failure).
For security report types ( sarif , sast , dast , container_scanning , dependency_scanning , secret_detection , api_fuzzing , and coverage_fuzzing ), the artifact is always uploaded but findings are only ingested when the producing job succeeds. A failed job, including one with allow_failure: true , does not produce ingested findings. For more information, see scanner exit codes . You can use artifacts:expire_in to set an expiration time for the artifacts, which overrides the instance’s default setting .
GitLab.com might have a different default artifacts expiry value . Some artifacts:reports types can be generated by multiple jobs in the same pipeline, and used by merge request or pipeline features from each job. To browse the report output files, ensure you include the artifacts:paths keyword in your job definition. Combined reports in parent pipelines using artifacts from child pipelines is not supported. Support for this feature is proposed in epic 8205 . artifacts:reports:accessibility The accessibility report uses pa11y to report on the accessibility impact of changes introduced in merge requests.
GitLab can display the results of one or more reports in the merge request accessibility widget . For more information, see Accessibility testing . artifacts:reports:annotations The annotations report is used to attach auxiliary data to a job. An annotations report is a JSON file with annotation sections. Each annotation section can have any desired name and can have any number of annotations of the same or differing types.
If the report path matches more than one file, each section name must be unique across all matched files. If two files contain a section with the same name, the artifact upload fails. Each annotation is a single key (the annotation type), containing the subkeys with the data for that annotation. Annotation types external_link An external_link annotation can be attached to a job to add a link to the job output page. The value of an external_link annotation is an object with the following keys: Key Description label The human-readable label associated with the link. url The URL pointed to by the link.
Example report The following is an example of what a job annotations report might look like: json { "my_annotation_section_1" : [ { "external_link" : { "label" : "URL 1" , "url" : "https://url1.example.com/" } }, { "external_link" : { "label" : "URL 2" , "url" : "https://url2.example.com/" } } ] } artifacts:reports:api_fuzzing Tier : Ultimate The api_fuzzing report collects API fuzzing bugs as artifacts. GitLab can display the results of one or more reports in: The merge request security scan report .
The Project Vulnerability report . The pipeline Security tab . The security dashboard . artifacts:reports:browser_performance Tier : Premium, Ultimate The browser_performance report collects browser performance testing metrics as an artifact. This artifact is a JSON file generated by the GitLab plugin for sitespeed.io . GitLab displays the results in the merge request. For more information, see browser performance testing .
GitLab cannot display the combined results of multiple browser_performance reports. artifacts:reports:coverage_report Use coverage_report to collect a coverage report in Cobertura or JaCoCo format. After the pipeline completes, GitLab parses the report and displays line-by-line coverage annotations in the merge request diff. This keyword produces diff annotations only. It does not display a coverage percentage in the MR widget or populate coverage history graphs.
To display a coverage percentage, configure the coverage keyword separately. For more information, see: Cobertura coverage visualization JaCoCo coverage visualization yaml artifacts : reports : coverage_report : coverage_format : cobertura path : coverage/cobertura-coverage.xml You can generate multiple reports and collect them using wildcards . GitLab merges the results into a single report. Coverage reports from child pipelines appear in merge request diff annotations, but are not shared with parent pipelines. artifacts:reports:codequality The codequality report collects code quality issues .
The collected code quality report uploads to GitLab as an artifact. GitLab can display the results of one or more reports in: The merge request code quality report . The merge request diff annotations . The full report . The artifacts:expire_in value is set to 1 week . artifacts:reports:container_scanning Tier : Ultimate The container_scanning report collects container scanning vulnerabilities . The collected container scanning report uploads to GitLab as an artifact.
GitLab can display the results of one or more reports in: The merge request container scanning widget . The pipeline Security tab . The security dashboard . The Project Vulnerability report . artifacts:reports:coverage_fuzzing Tier : Ultimate The coverage_fuzzing report collects coverage fuzzing bugs . The collected coverage fuzzing report uploads to GitLab as an artifact. GitLab can display the results of one or more reports in: The merge request security scan report .
The pipeline Security tab . The Project Vulnerability report . The security dashboard . artifacts:reports:cyclonedx Tier : Ultimate This report is a Software Bill of Materials describing the components of a project following the CycloneDX protocol format. You can specify multiple CycloneDX reports per job. These can be either supplied as a list of filenames, a filename pattern, or both: A filename pattern ( cyclonedx: gl-sbom-*.json , junit: test-results/**/*.json ).
An array of filenames ( cyclonedx: [gl-sbom-npm-npm.cdx.json, gl-sbom-bundler-gem.cdx.json] ). A combination of both ( cyclonedx: [gl-sbom-*.json, my-cyclonedx.json] ). Directories are not supported ( cyclonedx: test-results , cyclonedx: test-results/** ). The following example shows a job that exposes CycloneDX artifacts: yaml artifacts : reports : cyclonedx : - gl-sbom-npm-npm.cdx.json - gl-sbom-bundler-gem.cdx.json artifacts:reports:dast Tier : Ultimate The dast report collects DAST vulnerabilities .
The collected DAST report uploads to GitLab as an artifact. GitLab can display the results of one or more reports in: The merge request security scan report . The pipeline Security tab . The Project Vulnerability report . The security dashboard . artifacts:reports:dependency_scanning Tier : Ultimate The dependency_scanning report collects dependency scanning vulnerabilities . The collected dependency scanning report uploads to GitLab as an artifact.
GitLab can display the results of one or more reports in: The merge request dependency scanning widget . The pipeline Security tab . The security dashboard . The Project Vulnerability report . The dependency list . artifacts:reports:dotenv The dotenv report collects environment variables from a file and makes them available as CI/CD variables to later jobs in the pipeline. For more information, see dotenv variables . artifacts:reports:junit The junit report collects JUnit report format XML files .
The collected Unit test reports upload to GitLab as an artifact. Although JUnit was originally developed in Java, there are many third-party ports for other languages such as JavaScript, Python, and Ruby. See Unit test reports for more details and examples. The following example shows how to collect a JUnit XML report from Ruby RSpec tests: yaml rspec : stage : test script : - bundle install - rspec --format RspecJunitFormatter --out rspec.xml arti
The rest of this page is on the live site.