首页 > 解决方案 > 为 GitLab CI 管道中的多个作业聚合 SonarQube Maven 分析

问题描述

我想知道如何为 GitLab CI 管道中的多个作业聚合 SonarQube Maven 分析。

我的 GitLab CI 管道在不同的作业(在同一阶段)中构建后端和前端组件。它们需要不同的构建环境,因此,它们使用不同的图像。骨骼:

build-backend:
  image: my-backend-image
  stage: build
  script:
    - mvn xyz verify
build-frontend:
  image: my-frontend-image
  stage: build
  script:
    - build-frontend

如果我将声纳扫描添加到两个作业中,它们将在 SonarQube 上覆盖彼此的结果。因此,我需要 AFAIU

我错过了更简单的解决方案吗?

标签: mavensonarqubegitlab-ci

解决方案


推荐阅读