It creates project records and Gitea links. It does **not** clone repository contents, configure a scanner, or run an analysis. Users continue to analyze source code with their normal SonarScanner workflow.
Bifrost validates the selected organizations and repositories again on the server before creating projects. Imports are limited to 100 repositories per request. Project keys are derived from <code>organization_repository</code>, lowercased, and sanitized; selections that produce colliding keys are rejected. Each repository gets an individual result, so a project may be created even if adding its Gitea link fails.
- SonarQube Community Build 25.9.0.112764 is the version tested for this plugin.
- The SonarQube server must be able to reach the configured Gitea instance over HTTP or HTTPS.
- The Gitea token must be able to read the organizations and repositories you want to list. Enabling personal repositories also uses the token account’s user and repository endpoints.
- Each SonarQube user importing projects needs the global **Create Projects** permission. Administrators can also use the page.
| **Gitea URL** (<code>sonar.bifrost.giteaUrl</code>) | Base URL of the Gitea server, for example <code>https://git.example.com</code>. Do not append <code>/api/v1</code>. |
| **Gitea token** (<code>sonar.bifrost.giteaToken.secured</code>) | Server-side token used to read Gitea organization and repository metadata. |
| **Organization selection mode** (<code>sonar.bifrost.organizationMode</code>) | <code>fixed</code> lists the configured allowlist; <code>all</code> lists organizations visible to the token. The allowlist still filters organizations in <code>all</code> mode. |
| **Allowed organizations** (<code>sonar.bifrost.allowedOrganizations</code>) | Organization allowlist. Required in <code>fixed</code> mode; optional in <code>all</code> mode. |
| **Include personal repositories** (<code>sonar.bifrost.includePersonalRepositories</code>) | Also list repositories owned by the Gitea token account. |
The Gitea token is stored as a secured SonarQube setting and used only by the server. Browser requests go to Bifrost’s SonarQube web-service endpoints; the token is not sent to the browser.
The JAR is written to <code>target/sonar-bifrost-plugin-<version>.jar</code>. To calculate the Git-based development version and render the README version marker before packaging, use:
Pass <code>--build-arg REVISION=1.2.3</code> to choose a version explicitly. The Docker context excludes Git metadata, so pass the version from the host.
The end-to-end test starts an isolated Gitea, PostgreSQL, and SonarQube stack, installs the built plugin, then uses Chromium to create test organizations and repositories and import them through the UI.
On Windows with Git for Windows Bash and Docker Desktop or Rancher Desktop:
./scripts/e2e.ps1
The test resets only the Compose project named bifrost-e2e and its volumes. It uses disposable local credentials; do not reuse them elsewhere. The stack remains available at http://localhost:3000 (Gitea) and http://localhost:9000 (SonarQube) after a successful run. Playwright reports and traces are written under target/e2e-results/.
Remove the test stack and its data when finished:
docker compose --project-name bifrost-e2e down --volumes --remove-orphans
Gitea Actions runs Maven verification on pushes and pull requests. Pushes to main also build a release version, update CHANGELOG.md, create a vMAJOR.MINOR.PATCH tag and Gitea release, and attach the plugin JAR. The release commit is excluded from starting another release.
Configure the repository secret RELEASE_TOKEN. It needs repository write access and user read access because the release script looks up the token owner for Git authentication. If main is protected, allow that account to push the release commit and tag. Without that branch permission the build can pass but release publication will fail. The workflow derives the Gitea API and repository URLs from the Actions context, so no GITEA_* repository variables are needed. The runner also needs outbound access to fetch the pinned Actions and Java distribution.
SonarQube Cloud analysis and a green quality gate are not configured yet. The Marketplace submission process also requires a SonarQube Cloud project and a reviewed metadata change in [SonarSource’s update-center repository](https://github.com/SonarSource/sonar-update-center-properties).
CHANGELOG.md follows Keep a Changelog. Update the Unreleased section as changes are made. Before a release, review its wording; the release script moves it into the versioned section and updates comparison links.
This repository has no local agent-skill copies. Shared agent guidance is installed from the user's global catalog; keep this README, workflows, and scripts as the source for Bifrost-specific build and acceptance facts.