Chapter 25Lesson 03~135 minutes

Portfolios, Applications, Enterprise Reporting, and Governance Boundaries: Configuration, Design Patterns, and Trade-Offs

Choose project, application, portfolio, trend, report, grouping, and permission patterns by lifecycle and governance need rather than by dashboard convenience.

GovernanceApplicationsPortfoliosReportingAggregation

Learning objectives

  • Select project, application, portfolio, and report constructs according to lifecycle and audience.
  • Choose technical dashboards versus executive reports without losing drill-down, timestamps, or policy definitions.
  • Separate current-state decisions from trend analysis and avoid comparing snapshots taken under different definitions.
  • Choose curated versus automatic grouping with explicit ownership and change review.
  • Design permissions so governance visibility does not bypass private-project boundaries.
  • Build a Community Build fallback that is useful but unmistakably non-native.

1. Project versus Application versus Portfolio

Construct Best fit Current minimum edition Primary risk if misused
Project One independently analyzed codebase/lifecycle. Community Build Forcing unrelated ownership into one key hides boundaries.
Application Several projects that release together as one product. Developer Using it for unrelated executive grouping confuses release semantics.
Portfolio Governance across projects/applications with executive oversight. Enterprise Treating aggregate A/B/C as proof every project is healthy.
External report Free/local or cross-tool governance snapshot. Any Presenting custom math as native Sonar semantics or omitting freshness/access limits.

2. Technical dashboard versus executive report

A technical dashboard should maximize diagnostic fidelity: rule keys, exact failing gate conditions, new-code context, issue links, scanner/CE evidence, and source revision. An executive report should reduce cognitive load: release risk, trends, ownership, exceptions, and next actions. The reduction must be lossy in presentation but not lossy in provenance.

Technical view

Use live project/application pages, APIs, issue lists, measure details, activity, and task evidence.

Executive view

Use portfolio/PDF or a labeled external summary with dates, definitions, owner, and drill-down URLs.

Audit packet

Retain the report plus the project-level evidence used to create it so later readers can reproduce the conclusion.

3. Current state versus trend

A current-state report answers “what is the latest known result?” A trend answers “how has the same metric definition changed over time?” The project evidence behind either view should retain revision, ceTaskId, terminal Compute Engine status, and analysis date. Trend analysis becomes invalid when membership, branch selection, Quality Gate definition, instance mode, rating model, or project scope changes silently.

Whenever a portfolio definition changes, annotate that date. A sudden improvement after removing a poor-performing project is a governance-membership change, not code improvement.

4. Curated grouping versus automatic grouping

Portfolios can be defined using explicit project selection and, depending on current product options, dynamic criteria such as tags or regular expressions. Dynamic membership lowers maintenance cost but increases change risk: a naming/tagging change can move a project into or out of executive reporting without a direct portfolio edit.

Pattern Strength Control needed
Explicit member list High auditability and stable ownership. Review additions/removals as governed changes.
Tag-based selection Scales with organizational metadata. Govern tag ownership and detect membership drift.
Regex/all remaining projects Low manual effort. Strong tests, preview, exceptions, and change monitoring.
External manifest Works with Community Build and version control. Label it non-native and reconcile against visible projects.

5. Branch choice is part of the definition

A portfolio can monitor selected project branches; if no explicit branch is selected, the main branch is the normal default. An application can also compose branches from its component projects. Therefore a report must say whether it represents main, release branches, or another permanent branch. Comparing main of one project with release/2026.09 of another may be valid—but only when that choice is intentional.

6. Aggregation pattern by metric family

Metric family Safe governance pattern Do not do
Quality Gate Show each gate; optionally derive documented pass-ratio releasability. Replace project failures with one green aggregate label.
Ratings A–E Use Sonar’s documented portfolio conversion/average where explicitly simulating it. Weight by LOC unless the product definition says so.
Coverage/duplication percentages Use native aggregate or rebuild from underlying numerators/denominators. Average percentages.
Counts such as ncloc/issues Sum only when scopes do not overlap and metric definition permits. Sum overlapping projects or duplicated source.
Trend Track stable definition plus membership changes. Compare before/after without noting definition drift.

7. Permission design: governance is not an authorization bypass

Grant Create Applications or Create Portfolios only to users who own those definitions; object administration and viewing should remain bounded. A reader who cannot browse a private project should not receive an external report that exposes its source-sensitive details.

For generated documents, define a classification, intended recipient group, retention period, and revocation/update process. Enterprise email distribution is a convenience, not an exemption from data-governance review.

8. Commercial feature versus free local fallback

Design the fallback around evidence, not screenshots. A free local report should capture project keys, branch assumptions, latest analysis dates, Quality Gates, selected measures, formula definitions, membership manifest, and drill-down URLs. It should not reproduce proprietary UI or pretend to own native recomputation/history.

This makes the learning transferable: if a later enterprise license is introduced, the team can compare the native object against the same project-level evidence contract.

9. Worked scenario: one product and one executive domain

You have payments, orders, and web. Payments and orders deploy together; web deploys independently but belongs to the same Digital Commerce organization.

Need Choice Edition Observable evidence
Release readiness for payments+orders Application Developer+ Application definition, component branches, application recalculation task, application measures/gate.
Director overview of all three Portfolio Enterprise+ Portfolio definition, included branches, releasability, rating breakdown, last-analysis rows.
Monthly distributable summary PDF report Enterprise+ Report timestamp, recipients, source object, project freshness/drill-down.
Community Build training Versioned external manifest + Markdown report Free API responses, script version, formulas, token scope, report and links.

Knowledge check

When should two projects be put in an Application rather than only a Portfolio?

Why annotate a portfolio membership change on a trend chart?

What is safer than averaging three coverage percentages?

Can a report recipient be broader than the people allowed to browse its private projects?

What must a Community Build fallback say prominently?

Next lesson

Diagnose misleading governance views without hiding failures

Lesson 4 engineers stale, over-aggregated, permission-leaking, and edition-confused failure modes and repairs them evidence-first.

Official references and version notes

  • SonarQube downloads and editions — current Community Build, commercial release stream, Developer/Enterprise/Data Center feature boundaries, and current LTA.
  • SonarQube Server — Applications — lifecycle-oriented synthetic aggregation, consolidated application view/gate, and recalculation model.
  • Managing applications — creation/admin permissions, project/branch membership, and background recalculation.
  • SonarQube Server — Portfolios — Enterprise boundary, releasability, rating conversion/averaging, breakdown, trend, and last-analysis context.
  • Managing portfolios — permissions, project/branch selection, applications/nested portfolios, and recalculation.
  • PDF reports — Enterprise Edition+ reports for projects/applications/portfolios, subscriptions, and permanent-branch constraints.
  • Measures and metrics — coverage numerator/denominator, ratings, Quality Gate metrics, and portfolio-visible metric boundaries.
  • Community Build Web API — bearer authentication and documented project evidence retrieval used by the free lab.
Version and compatibility note

Rechecked 2026-09-08. Mandatory examples target Community Build 26.9.0.129388 and SonarScanner CLI 8.1.0.6389. The current commercial intermediate line is SonarQube Server 2026 Release 4.1 / 2026.4.1; the current LTA is 2026.1.5 LTA. Applications start in Developer Edition. Portfolios and native PDF reporting start in Enterprise Edition. Current portfolio releasability is a Quality-Gate pass ratio with A/B/C/D/E thresholds; portfolio quality ratings use documented A=1 through E=5 conversion and averaging. Do not extrapolate those formulas to coverage, duplication, SCA, or other percentages/counts without metric-specific documentation. Aggregate objects and reports can lag component analysis because recalculation/reporting are separate state transitions; always record member branches, analysis dates, object definition, permissions, report timestamp, and mode (MQR or Standard Experience).

Governance boundary. This chapter never asks learners to bypass licensing, copy commercial binaries, expose restricted project data, lower Quality Gates, delete failing members, or edit SonarQube database/search state. Community Build exercises use project-level evidence and a clearly labeled external simulation. Any licensed Application/Portfolio/PDF exercise belongs only on an authorized disposable Server instance.

Keep the academy open

Support free, practical DevOps education.

Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this address.