chore: Update SonarQube project configuration for CI workflows
Some checks failed
Integration Tests / performance-tests (push) Has been cancelled
Integration Tests / integration-tests (push) Has been cancelled
Frontend (React) / test (16) (push) Failing after 1m37s
Frontend (React) / test (20) (push) Failing after 1m28s
Docker Build and Push / build-and-push (push) Failing after 37s
Service Adapters (Python FastAPI) / test (3.1) (push) Failing after 20s
API Docs (Node.js Express) / test (20) (push) Successful in 1m37s
API Docs (Node.js Express) / test (16) (push) Successful in 1m40s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 24s
API Docs (Node.js Express) / test (18) (push) Successful in 1m39s
Frontend (React) / test (18) (push) Failing after 1m53s
API Gateway (Java Spring Boot) / test (17) (push) Failing after 1m56s
Frontend (React) / build (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 26s
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 23s
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 1m47s
Service Adapters (Python FastAPI) / test (3.9) (push) Failing after 26s
Service Adapters (Python FastAPI) / build (push) Has been skipped
API Gateway (Java Spring Boot) / test (21) (push) Failing after 2m1s
API Docs (Node.js Express) / build (push) Successful in 40s
API Gateway (Java Spring Boot) / build (push) Has been skipped
API Gateway (Java Spring Boot) / security (push) Has been skipped
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m46s
LabFusion CI/CD Pipeline / frontend (push) Failing after 1m57s
Frontend (React) / lighthouse (push) Has been skipped
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
Some checks failed
Integration Tests / performance-tests (push) Has been cancelled
Integration Tests / integration-tests (push) Has been cancelled
Frontend (React) / test (16) (push) Failing after 1m37s
Frontend (React) / test (20) (push) Failing after 1m28s
Docker Build and Push / build-and-push (push) Failing after 37s
Service Adapters (Python FastAPI) / test (3.1) (push) Failing after 20s
API Docs (Node.js Express) / test (20) (push) Successful in 1m37s
API Docs (Node.js Express) / test (16) (push) Successful in 1m40s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 24s
API Docs (Node.js Express) / test (18) (push) Successful in 1m39s
Frontend (React) / test (18) (push) Failing after 1m53s
API Gateway (Java Spring Boot) / test (17) (push) Failing after 1m56s
Frontend (React) / build (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 26s
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 23s
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 1m47s
Service Adapters (Python FastAPI) / test (3.9) (push) Failing after 26s
Service Adapters (Python FastAPI) / build (push) Has been skipped
API Gateway (Java Spring Boot) / test (21) (push) Failing after 2m1s
API Docs (Node.js Express) / build (push) Successful in 40s
API Gateway (Java Spring Boot) / build (push) Has been skipped
API Gateway (Java Spring Boot) / security (push) Has been skipped
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m46s
LabFusion CI/CD Pipeline / frontend (push) Failing after 1m57s
Frontend (React) / lighthouse (push) Has been skipped
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
### Summary of Changes - Changed SonarQube project keys and names for all services to follow a consistent naming convention. - Replaced `sonar-scanner` with `@sonar/scan` in the frontend and other workflows for improved compatibility. - Simplified SonarQube analysis commands by removing unnecessary parameters and ensuring each service reports to its dedicated project. ### Expected Results - Enhanced clarity and maintainability of CI configurations. - Improved isolation of quality metrics for each service in SonarQube. - Streamlined integration process for better reporting and analysis.
This commit is contained in:
@@ -46,28 +46,14 @@ jobs:
|
||||
maven-
|
||||
fail-on-cache-miss: false
|
||||
|
||||
- name: Run tests
|
||||
run: ./mvnw test
|
||||
|
||||
- name: Generate code coverage
|
||||
run: ./mvnw jacoco:report
|
||||
|
||||
- name: Send results to SonarQube
|
||||
- name: Run tests and send to SonarQube
|
||||
run: |
|
||||
echo "Sending API Gateway results to SonarQube..."
|
||||
./mvnw sonar:sonar \
|
||||
echo "Running tests and sending results to SonarQube..."
|
||||
./mvnw clean verify sonar:sonar \
|
||||
-Dsonar.projectKey=labfusion-api-gateway \
|
||||
-Dsonar.projectName=LabFusion API Gateway \
|
||||
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \
|
||||
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
|
||||
-Dsonar.projectKey=labFusion \
|
||||
-Dsonar.projectName="LabFusion" \
|
||||
-Dsonar.projectVersion=1.0.0 \
|
||||
-Dsonar.modules=api-gateway \
|
||||
-Dsonar.sources=src/main/java \
|
||||
-Dsonar.tests=src/test/java \
|
||||
-Dsonar.java.binaries=target/classes \
|
||||
-Dsonar.java.test.binaries=target/test-classes \
|
||||
-Dsonar.junit.reportPaths=target/surefire-reports \
|
||||
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
|
||||
-Dsonar.token=${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
- name: Run code quality checks
|
||||
run: ./mvnw spotbugs:check checkstyle:check
|
||||
@@ -130,20 +116,14 @@ jobs:
|
||||
run: |
|
||||
echo "Sending Service Adapters results to SonarQube..."
|
||||
# Install SonarQube Scanner for Python
|
||||
pip install sonar-scanner
|
||||
pip install pysonar
|
||||
|
||||
# Run SonarQube analysis
|
||||
sonar-scanner \
|
||||
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \
|
||||
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
|
||||
-Dsonar.projectKey=labFusion \
|
||||
-Dsonar.projectName="LabFusion" \
|
||||
-Dsonar.projectVersion=1.0.0 \
|
||||
-Dsonar.modules=service-adapters \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.tests=tests \
|
||||
-Dsonar.python.coverage.reportPaths=coverage.xml \
|
||||
-Dsonar.python.xunit.reportPath=tests/reports/junit.xml
|
||||
pysonar \
|
||||
--sonar-host-url=${{ secrets.SONAR_HOST_URL }} \
|
||||
--sonar-token=${{ secrets.SONAR_TOKEN }} \
|
||||
--sonar-project-key=labfusion-service-adapters \
|
||||
--sonar-project-name=LabFusion Service Adapters
|
||||
|
||||
- name: Build Docker image (test only)
|
||||
run: docker build -t service-adapters:test .
|
||||
@@ -198,20 +178,14 @@ jobs:
|
||||
run: |
|
||||
echo "Sending API Docs results to SonarQube..."
|
||||
# Install SonarQube Scanner for Node.js
|
||||
npm install -g sonar-scanner
|
||||
npm install -g @sonar/scan
|
||||
|
||||
# Run SonarQube analysis
|
||||
sonar-scanner \
|
||||
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \
|
||||
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
|
||||
-Dsonar.projectKey=labFusion \
|
||||
-Dsonar.projectName="LabFusion" \
|
||||
-Dsonar.projectVersion=1.0.0 \
|
||||
-Dsonar.modules=api-docs \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.tests=__tests__ \
|
||||
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info \
|
||||
-Dsonar.testExecutionReportPaths=test-results.xml
|
||||
-Dsonar.projectKey=labfusion-api-docs \
|
||||
-Dsonar.projectName=LabFusion API Docs
|
||||
|
||||
- name: Build application
|
||||
run: npm run build
|
||||
@@ -269,20 +243,14 @@ jobs:
|
||||
run: |
|
||||
echo "Sending Frontend results to SonarQube..."
|
||||
# Install SonarQube Scanner for Node.js
|
||||
npm install -g sonar-scanner
|
||||
npm install -g @sonar/scan
|
||||
|
||||
# Run SonarQube analysis
|
||||
sonar-scanner \
|
||||
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \
|
||||
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
|
||||
-Dsonar.projectKey=labFusion \
|
||||
-Dsonar.projectName="LabFusion" \
|
||||
-Dsonar.projectVersion=1.0.0 \
|
||||
-Dsonar.modules=frontend \
|
||||
-Dsonar.sources=src \
|
||||
-Dsonar.tests=src \
|
||||
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info \
|
||||
-Dsonar.testExecutionReportPaths=test-results.xml
|
||||
-Dsonar.projectKey=labfusion-frontend \
|
||||
-Dsonar.projectName=LabFusion Frontend
|
||||
|
||||
- name: Build application
|
||||
run: npm run build
|
||||
|
||||
Reference in New Issue
Block a user