Tiled Parser and Scene & Palette Management in Studio
Test / Build occurred while executing withChecks step.
Intrepid/Prometeu/Studio/pipeline/head There was a failure building this commit
Intrepid/Prometeu/Studio/pipeline/pr-master There was a failure building this commit

This commit is contained in:
2026-04-23 18:08:38 +01:00
parent 9e128988e1
commit 42daa49335
101 changed files with 6065 additions and 1308 deletions
@@ -1,16 +0,0 @@
# LSN-0039: Jenkins + JaCoCo Integration with Multi-Module Gradle
- **Problem:** O Jenkinsfile estava desatualizado, tentando rodar uma task de cobertura inexistente (`testCodeCoverageReport`) em um subprojeto específico, ignorando a cobertura global e causando falhas no pipeline.
- **Decision:** Alinhar o `Jenkinsfile` com a task de agregação customizada no root project (`jacocoTestReport`), removendo a dependência de subprojetos específicos para métricas globais.
- **Implementation:**
- Atualizado o comando de execução no Jenkins: `./gradlew clean test jacocoTestReport`.
- Ajustado o `recordCoverage` para ler o XML consolidado em `build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml`.
- Ajustado o `publishHTML` para exibir o relatório consolidado em `build/reports/jacoco/jacocoTestReport/html`.
- **Example:**
- Antes: `SRS_APP/build/reports/...` (específico por app).
- Depois: `build/reports/...` (global do projeto).
- **Pitfalls:**
- Ao usar relatórios consolidados no root, deve-se garantir que o Gradle rode a task de agregação *após* os testes de todos os subprojetos.
- O Jenkins precisa de acesso ao workspace root para encontrar esses arquivos; caminhos relativos no `Jenkinsfile` geralmente partem do root do checkout.
- **References:**
- `DSC-0024`, `DEC-0025`, `PLN-0048`.
@@ -0,0 +1,45 @@
---
id: LSN-0044
ticket: jacoco-reports-consolidation
title: Jenkins Alignment with Consolidated JaCoCo Reports
created: 2026-04-07
tags:
- infra
- gradle
- jacoco
- jenkins
---
## Context
The Jenkins pipeline was still wired to an outdated coverage task and module-specific report paths. That made CI brittle after the project moved coverage reporting to the root-level consolidated `jacocoTestReport` task.
## Key Decisions
### Jenkins Reads Root-Level Coverage
**What:** Jenkins should run `./gradlew clean test jacocoTestReport` and publish coverage from the root project report directory.
**Why:** Coverage is aggregated across modules, so CI should not depend on a single application subproject path.
**Trade-offs:** The root task must run after all relevant tests. Jenkins paths must be rooted at the checkout workspace rather than a submodule directory.
## Patterns and Algorithms
The canonical report locations are:
- XML: `build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml`
- HTML: `build/reports/jacoco/jacocoTestReport/html`
Jenkins `recordCoverage` should consume the XML report. Jenkins `publishHTML` should expose the HTML directory.
## Pitfalls
- Do not point Jenkins at `SRS_APP/build/reports/...` or another module-local report when the project expects consolidated root coverage.
- Do not run only the reporting task without ensuring tests have executed first.
- Do not assume Jenkins relative paths start inside a Gradle subproject; treat the checkout root as the base.
## Takeaways
- Root-level coverage aggregation needs root-level CI report paths.
- The Jenkinsfile and Gradle coverage task names must move together.