Merge remote-tracking branch 'origin/main' into skills-centralize-bifrost
# Conflicts: # .claude/skills/gitea-actions-ci/SKILL.md # .claude/skills/release-versioning-changelog/SKILL.md # README.md
This commit is contained in:
commit
93cf99b523
7 files changed
+142
-120
No files matched your search
@@ -5,6 +5,7 @@ on:
|
||||
branches: ["**"]
|
||||
tags: ["v*.*.*"]
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
revision:
|
||||
@@ -31,7 +32,6 @@ jobs:
|
||||
revision=$(sh scripts/version.sh)
|
||||
if [ -n "$REVISION_OVERRIDE" ]; then revision="$REVISION_OVERRIDE"; fi
|
||||
echo "revision=$revision" >> "$GITHUB_OUTPUT"
|
||||
echo "release_needed=$(sh scripts/version.sh --release-needed)" >> "$GITHUB_OUTPUT"
|
||||
echo "release_version=$(sh scripts/version.sh --next-release)" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
REVISION_OVERRIDE: ${{ github.event.inputs.revision }}
|
||||
@@ -47,26 +47,23 @@ jobs:
|
||||
run: |
|
||||
sh scripts/render-readme.sh "$BUILD_REVISION"
|
||||
sh ./mvnw -B -Drevision="$BUILD_REVISION" verify
|
||||
- name: Upload plugin JAR
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: sonar-bifrost-plugin-${{ steps.version.outputs.revision }}
|
||||
path: target/sonar-bifrost-plugin-${{ steps.version.outputs.revision }}.jar
|
||||
if-no-files-found: error
|
||||
- name: Build release version
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.version.outputs.release_needed == 'true' && !contains(github.event.head_commit.message, 'chore(release):')
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
|
||||
env:
|
||||
RELEASE_VERSION: ${{ steps.version.outputs.release_version }}
|
||||
run: |
|
||||
sh scripts/render-readme.sh "$RELEASE_VERSION"
|
||||
sh ./mvnw -B -Drevision="$RELEASE_VERSION" verify
|
||||
- name: Create release commit, tag, and Gitea release
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.version.outputs.release_needed == 'true' && !contains(github.event.head_commit.message, 'chore(release):')
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
GITEA_API_URL: ${{ vars.GITEA_API_URL }}
|
||||
GITEA_REPOSITORY: ${{ github.repository }}
|
||||
GITEA_REPOSITORY_URL: ${{ vars.GITEA_REPOSITORY_URL }}
|
||||
GITEA_SERVER_URL: ${{ github.server_url }}
|
||||
GITEA_MAIN_BRANCH: main
|
||||
RELEASE_VERSION: ${{ steps.version.outputs.release_version }}
|
||||
run: sh scripts/release.sh "$RELEASE_VERSION"
|
||||
run: |
|
||||
export GITEA_API_URL="${GITEA_SERVER_URL%/}/api/v1"
|
||||
export GITEA_REPOSITORY_URL="${GITEA_SERVER_URL%/}/${GITEA_REPOSITORY}"
|
||||
git remote set-url origin "${GITEA_REPOSITORY_URL}.git"
|
||||
sh scripts/release.sh "$RELEASE_VERSION"
|
||||
+1
-1
@@ -22,4 +22,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Check Create Projects permission and report existing-project status through SonarQube's public Web APIs.
|
||||
- Send SonarQube's XSRF token on browser POSTs and verify the complete repository import flow.
|
||||
|
||||
[Unreleased]: http://localhost:3000/owner/bifrost/compare/v0.1.0...HEAD
|
||||
[Unreleased]: https://sources.tordais.cc/arnaud.dartois/Bifrost/compare/v0.1.0...HEAD
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Arnaud Dartois
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,146 +1,129 @@
|
||||
# Bifrost
|
||||
|
||||
Proof of concept plugin that lists Gitea repositories and creates SonarQube Community Build projects for selected repositories.
|
||||
Bifrost is a SonarQube Community Build plugin for browsing Gitea organizations and creating linked SonarQube projects.
|
||||
|
||||
## Target and status
|
||||
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.
|
||||
|
||||
- SonarQube Community Build: `25.9.0.112764` (tested by loading the plugin in the exact Community Build image).
|
||||
- Sonar plugin API: `13.0.0.3026`.
|
||||
- Java: 17.
|
||||
- Artifact: `sonar-bifrost-plugin-<version>.jar`.
|
||||
- Generated build version: `@PLUGIN_VERSION@`.
|
||||
- Maven is used because SonarSource publishes the supported plugin packaging extension for Maven.
|
||||
- **License:** MIT ([LICENSE](LICENSE))
|
||||
- **Project and source:** [sources.tordais.cc/arnaud.dartois/Bifrost](https://sources.tordais.cc/arnaud.dartois/Bifrost)
|
||||
- **Issue tracker:** [Gitea issues](https://sources.tordais.cc/arnaud.dartois/Bifrost/issues)
|
||||
- **Tested platform:** SonarQube Community Build 25.9.0.112764
|
||||
- **Plugin API:** 13.0.0.3026
|
||||
- **Build target:** Java 17
|
||||
- **Build version:** <code>@PLUGIN_VERSION@</code> (rendered by <code>make build</code>)
|
||||
|
||||
The Docker build completed with Java 17, all eight unit tests passed, and the exported JAR manifest contains the expected plugin metadata. The exact 25.9.0.112764 Community Build loaded the plugin, reported `UP`, and served the page bundle with HTTP 200. On 2026-10-29, `./scripts/e2e.ps1` passed from fresh named volumes: Chromium created two Gitea organizations and four repositories, imported all four through the extension, and verified all four SonarQube projects and Gitea links.
|
||||
Other SonarQube versions have not been verified. Bifrost is not listed in the SonarQube Marketplace. SonarQube Cloud analysis is not configured.
|
||||
|
||||
## Tree
|
||||
## What it does
|
||||
|
||||
```text
|
||||
.
|
||||
├── .gitea/workflows/build.yml # Gitea Actions CI and release pipeline
|
||||
├── .mvn/wrapper/ # Maven distribution pin
|
||||
├── scripts/ # Version, changelog, and release helpers
|
||||
├── src/main/java/cc/tordais/sonar/bifrost/
|
||||
│ ├── BifrostPlugin.java
|
||||
│ ├── config/BifrostProperties.java
|
||||
│ ├── gitea/GiteaClient.java
|
||||
│ ├── gitea/GiteaRepository.java
|
||||
│ ├── page/ImportPage.java
|
||||
│ ├── service/OrganizationPolicy.java
|
||||
│ ├── service/ProjectKey.java
|
||||
│ └── ws/BifrostWebService.java
|
||||
├── src/main/resources/static/import.js
|
||||
├── src/test/java/cc/tordais/sonar/bifrost/
|
||||
│ ├── gitea/GiteaClientTest.java
|
||||
│ └── service/{OrganizationPolicyTest,ProjectKeyTest}.java
|
||||
├── tests/e2e/ # Pinned Playwright browser validation
|
||||
├── scripts/e2e.sh # Fresh-stack end-to-end runner
|
||||
├── CHANGELOG.md
|
||||
├── Dockerfile
|
||||
├── docker-compose.yml
|
||||
├── Makefile
|
||||
├── mvnw, mvnw.cmd
|
||||
└── pom.xml
|
||||
```
|
||||
From the **Import from Gitea** page, a user can:
|
||||
|
||||
## Local build
|
||||
- Browse organizations from the configured selection policy: a fixed allowlist or organizations accessible to the Gitea token.
|
||||
- Optionally include repositories owned by the token account.
|
||||
- See each repository’s default branch, Gitea URL, and whether a matching SonarQube project already exists.
|
||||
- Select repositories and create SonarQube projects with links back to Gitea.
|
||||
|
||||
The launcher bootstraps the pinned Maven 3.9.9 distribution and verifies its SHA-512 checksum. It requires network access to Maven Central on first use.
|
||||
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.
|
||||
|
||||
```sh
|
||||
make build
|
||||
```
|
||||
## Requirements
|
||||
|
||||
On Windows, run `mvnw.cmd -B -Drevision=1.2.3 verify`. To force a version manually, pass `-Drevision=1.2.3` to Maven.
|
||||
|
||||
## Docker build
|
||||
|
||||
Docker builds the plugin using a pinned Maven/JDK image and exports the JAR without a local JDK or Maven installation:
|
||||
|
||||
```sh
|
||||
docker build --build-arg REVISION="$(sh scripts/version.sh)" --target export --output type=local,dest=dist .
|
||||
```
|
||||
|
||||
Pass a version with `--build-arg REVISION=1.2.3`. The Docker context excludes Git metadata, so pass the output of `scripts/version.sh` from the host to preserve tag-based versions. A direct Docker build without `REVISION` uses the no-Git fallback.
|
||||
- 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.
|
||||
|
||||
## Install and configure
|
||||
|
||||
1. Copy the JAR to `<sonarqubeHome>/extensions/plugins/` and restart SonarQube. In Docker, mount it at `/opt/sonarqube/extensions/plugins/`.
|
||||
2. In Administration > Configuration, set Gitea URL and token, selection mode, allowed organizations, and the personal repositories option.
|
||||
3. Grant the user the global Create Projects permission.
|
||||
4. Open Import from Gitea, select organizations or All, select repositories, then choose Import.
|
||||
1. Build the plugin or download a JAR from a Gitea release, when one is available.
|
||||
2. Copy the JAR from <code>target</code> to <code>$SONARQUBE_HOME/extensions/plugins/</code>.
|
||||
3. Restart SonarQube.
|
||||
4. In **Administration → Configuration**, configure the properties below.
|
||||
5. Grant the importing users the global **Create Projects** permission, then open **Import from Gitea**.
|
||||
|
||||
The token is held only by the plugin server. The plugin checks the caller's Create Projects permission, revalidates each selected organization and repository, then calls SonarQube's public project and project-link Web APIs through `Request.localConnector()`.
|
||||
| Property | Description |
|
||||
| --- | --- |
|
||||
| **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. |
|
||||
|
||||
## Test scenario
|
||||
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.
|
||||
|
||||
Run the complete fresh-stack validation from PowerShell:
|
||||
## Build and test
|
||||
|
||||
```powershell
|
||||
./scripts/e2e.ps1
|
||||
```
|
||||
The Maven Wrapper downloads the pinned Maven 3.9.9 distribution and verifies its checksum. The first build needs network access to Maven Central.
|
||||
|
||||
This builds the current plugin JAR, removes only the dedicated `bifrost-e2e` Compose project's volumes, starts the pinned PostgreSQL, Gitea, and SonarQube images, creates a test Gitea administrator, and runs Chromium through the plugin page. The browser test creates organizations `alpha-lab` and `beta-lab`, with `api` and `web` repositories in each, configures SonarQube through its Web API, verifies selection retention, imports the four repositories, and checks each project key and Gitea link.
|
||||
Build the plugin and run its unit tests:
|
||||
|
||||
Expected project keys are `alpha-lab_api`, `alpha-lab_web`, `beta-lab_api`, and `beta-lab_web`. The test leaves the isolated stack running for inspection at `http://localhost:9000` and `http://localhost:3000`. Credentials are test-only defaults and must never be reused outside this disposable stack. Playwright HTML report, traces, and screenshots are written under `target/e2e-results/`.
|
||||
./mvnw -B verify
|
||||
|
||||
Remove only the E2E project and its volumes when finished:
|
||||
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:
|
||||
|
||||
```powershell
|
||||
docker compose --project-name bifrost-e2e down --volumes --remove-orphans
|
||||
```
|
||||
make build
|
||||
|
||||
## Versioning
|
||||
Run only the unit tests with:
|
||||
|
||||
Git tags `vMAJOR.MINOR.PATCH` are the release source of truth. Commit subjects follow Conventional Commits. `feat:` requests a minor release, `fix:`, `perf:`, and `refactor:` request a patch, and `!` or a `BREAKING CHANGE:` footer requests a major release. Other types do not request a release.
|
||||
make test
|
||||
|
||||
Examples:
|
||||
A Docker build can export the JAR without a local Java or Maven installation:
|
||||
|
||||
- At tag `v1.2.3`: `scripts/version.sh` returns `1.2.3`.
|
||||
- After two commits since `v1.2.3`, without a release-triggering change: it returns `1.2.3-SNAPSHOT.2+<short-sha>`.
|
||||
- With no tags: it returns `0.1.0-SNAPSHOT.<commit-count>+<short-sha>`.
|
||||
- To force a local version: `sh ./mvnw -Drevision=2.0.0-SNAPSHOT package`.
|
||||
docker build --build-arg REVISION="$(sh scripts/version.sh)" --target export --output type=local,dest=dist .
|
||||
|
||||
If the workflow pushes a tag but release publication fails, inspect the tag and changelog commit first. Re-run the release API request for the existing tag after confirming there is no existing release. Do not force-move a published tag. If the tag itself points to the wrong commit, coordinate a deliberate corrective tag/release; do not silently rewrite it.
|
||||
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.
|
||||
|
||||
## Changelog
|
||||
## End-to-end test
|
||||
|
||||
`CHANGELOG.md` follows Keep a Changelog 1.1.0. The intended mapping is `feat:` to Added; `fix:` to Fixed; `perf:` and `refactor:` to Changed; `deprecate:` to Deprecated; `revert:` to Removed; `security:` to Security. Breaking changes are prefixed with **BREAKING:**. `docs:`, `chore:`, `ci:`, `test:`, and `style:` are excluded.
|
||||
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.
|
||||
|
||||
Edit the `[Unreleased]` entries by hand before release when generated wording needs correction. `sh scripts/changelog.sh X.Y.Z` transfers curated entries or generates entries from Conventional Commits, then updates comparison links using `GITEA_REPOSITORY_URL`. `sh scripts/check-changelog.sh` validates headings, categories, dates, order, and comparison links.
|
||||
On Linux with Docker:
|
||||
|
||||
make e2e
|
||||
|
||||
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
|
||||
|
||||
## CI and releases
|
||||
|
||||
The Gitea Actions workflow checks out full history/tags, installs Java 17, calculates a version, validates changelog formatting on pull requests, runs Maven verification, and uploads the JAR. On a main-branch push, a release commit/tag and Gitea release are created when Conventional Commits request a bump.
|
||||
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 repository variable `GITEA_API_URL` (for example, `https://gitea.example/api/v1`), repository variable `GITEA_REPOSITORY_URL` (the repository web URL), and secret `RELEASE_TOKEN`. The token needs repository write access to push the changelog commit/tag and create a release with an asset. For protected branches, allow this token identity to push the release commit to `main`, or use a dedicated release branch and adjust `GITEA_MAIN_BRANCH`. Actions use GitHub-hosted action sources (`actions/checkout`, `actions/setup-java`, `actions/upload-artifact`); an isolated act_runner may need those repositories mirrored or outbound GitHub access.
|
||||
Version bumps follow Conventional Commits:
|
||||
|
||||
## Compatibility and validation notes
|
||||
- Breaking changes (!) or a BREAKING CHANGE: footer request a major bump.
|
||||
- feat: requests a minor bump.
|
||||
- fix:, perf:, and refactor: request a patch bump.
|
||||
- Other commit types default to a patch bump so a push to main still produces a release.
|
||||
|
||||
The implementation targets SonarQube Community Build `25.9.0.112764`, plugin API `13.0.0.3026`, and Java 17. When changing the SonarQube target, verify version-sensitive behavior against official SonarSource documentation and the target source or artifact metadata, then update the API/compiler/manifest pins and run the relevant build and runtime validation.
|
||||
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.
|
||||
|
||||
The local end-to-end acceptance scenario is documented under [Test scenario](#test-scenario), including its pinned service versions, fixture organizations and repositories, project/link assertions, and isolated cleanup command. Release and CI behavior is documented under [Versioning](#versioning), [Changelog](#changelog), and [CI and releases](#ci-and-releases). These sections are the product-specific source of truth.
|
||||
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).
|
||||
|
||||
## Troubleshooting
|
||||
## Changelog
|
||||
|
||||
- **Plugin rejected at startup:** verify the JAR manifest `Plugin-Key`, `Plugin-Version`, and `Sonar-Version` against the target API, then inspect `web.log`.
|
||||
- **No organizations appear:** check the Gitea URL from the SonarQube container, token permissions, organization allowlist, and Gitea logs.
|
||||
- **401 or 403 from Gitea:** replace the token or grant read access to the relevant organization repositories.
|
||||
- **Import denied:** grant the current SonarQube user Create Projects.
|
||||
- **Project exists:** choose a different source repository or remove the existing project; the plugin does not overwrite projects.
|
||||
- **Sanitized key collision:** rename one repository or organization so their sanitized combined keys differ.
|
||||
- **SonarQube does not start in Docker:** check available memory and the host's `vm.max_map_count` requirement for the bundled search engine.
|
||||
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.
|
||||
|
||||
## Limitations and risks
|
||||
Validate the changelog with:
|
||||
|
||||
- The official plugin API compatibility table omits Community Build 25.9. `13.0.0.3026` was inferred from target server dependency metadata and adjacent releases; the plugin has now built and loaded successfully on the exact 25.9.0.112764 image.
|
||||
- The manifest `Sonar-Version` denotes the minimum plugin API version. The separate `sonar.minimumVersion` property records the target product release because the documented manifest field does not encode a SonarQube product version.
|
||||
- The UTF-8 plugin display name is set to ASCII `Bifrost` because manifest encoding has not yet been confirmed by inspecting a built JAR.
|
||||
- The `/api/bifrost/import` action creates projects and their Gitea links through the public `LocalConnector`. The full authenticated project and link creation flow passed on the target local stack. A separate non-admin Create Projects account and role matrix were not included in this proof of concept.
|
||||
- Existing-project detection uses `api/components/show` through the public `LocalConnector` for each repository. Projects the user cannot browse may return a permission error; the importer stops that organization list rather than guessing that those projects are missing.
|
||||
- Create Projects permission is checked against `api/users/current` through `LocalConnector`. The test administrator passed the permission check; denial behavior for a user without Create Projects was not tested end to end.
|
||||
- The global page menu is not conditionally hidden by Create Projects permission because the public page API documents only administrator gating. Every data and import web service checks Create Projects; the project and link Web APIs apply their own permissions. Menu hiding is a UI limitation.
|
||||
- The Gitea token scope and response fields may vary by Gitea version. The local Compose default is Gitea 1.23.8; no external instance was supplied.
|
||||
- The Maven launcher is a small pinned-distribution bootstrap, not the upstream Maven Wrapper JAR implementation. It requires network access for initial Maven download; the Docker build used Maven directly.
|
||||
- Release scripts and workflow are scaffolding and have not been exercised against a real Gitea runner or protected branch.
|
||||
- The Linux shell runner `scripts/e2e.sh` was not exercised on this Windows host. The verified native runner is `./scripts/e2e.ps1`.
|
||||
sh scripts/check-changelog.sh
|
||||
|
||||
## Agent guidance
|
||||
|
||||
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.
|
||||
|
||||
## Known limitations
|
||||
|
||||
- Compatibility has been verified on Community Build 25.9.0.112764; other versions are unverified.
|
||||
- Bifrost provisions SonarQube projects but does not import source code or start analysis.
|
||||
- The end-to-end scenario uses an administrator account. A separate non-admin permission matrix has not been tested.
|
||||
- Projects hidden from the current user may affect existing-project detection.
|
||||
- The Gitea release job requires its token account to be permitted to push to protected main.
|
||||
- No SonarQube Cloud project or Marketplace listing is configured.
|
||||
|
||||
For bugs or feature requests, use the [public issue tracker](https://sources.tordais.cc/arnaud.dartois/Bifrost/issues).
|
||||
@@ -6,6 +6,24 @@
|
||||
<version>${revision}</version>
|
||||
<packaging>sonar-plugin</packaging>
|
||||
<name>Bifrost</name>
|
||||
<description>Browse Gitea repositories and create linked SonarQube Community Build projects.</description>
|
||||
<url>https://sources.tordais.cc/arnaud.dartois/Bifrost</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>MIT License</name>
|
||||
<url>https://opensource.org/license/mit/</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<issueManagement>
|
||||
<system>Gitea</system>
|
||||
<url>https://sources.tordais.cc/arnaud.dartois/Bifrost/issues</url>
|
||||
</issueManagement>
|
||||
<scm>
|
||||
<connection>scm:git:https://sources.tordais.cc/arnaud.dartois/Bifrost.git</connection>
|
||||
<developerConnection>scm:git:https://sources.tordais.cc/arnaud.dartois/Bifrost.git</developerConnection>
|
||||
<url>https://sources.tordais.cc/arnaud.dartois/Bifrost</url>
|
||||
</scm>
|
||||
<properties>
|
||||
<revision>0.1.0-SNAPSHOT</revision>
|
||||
<maven.compiler.release>17</maven.compiler.release>
|
||||
@@ -28,7 +46,7 @@
|
||||
<finalName>sonar-bifrost-plugin-${revision}</finalName>
|
||||
<plugins>
|
||||
<plugin><groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId><artifactId>sonar-packaging-maven-plugin</artifactId><version>1.23.0.740</version><extensions>true</extensions>
|
||||
<configuration><pluginKey>bifrost</pluginKey><pluginName>Bifrost (Gitea Import)</pluginName><pluginClass>cc.tordais.sonar.bifrost.BifrostPlugin</pluginClass><pluginDescription>Import Gitea repositories as SonarQube projects.</pluginDescription><pluginUrl>http://localhost:3000/owner/bifrost</pluginUrl></configuration>
|
||||
<configuration><pluginKey>bifrost</pluginKey><pluginName>Bifrost (Gitea Import)</pluginName><pluginClass>cc.tordais.sonar.bifrost.BifrostPlugin</pluginClass><pluginDescription>Browse Gitea repositories and create linked SonarQube projects. Bifrost does not clone or analyze source code.</pluginDescription><pluginUrl>${project.url}</pluginUrl><pluginIssueTrackerUrl>${project.issueManagement.url}</pluginIssueTrackerUrl><pluginSourcesUrl>${project.scm.url}</pluginSourcesUrl></configuration>
|
||||
</plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.13.0</version></plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>3.5.2</version></plugin>
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eu
|
||||
version=${1:?Usage: scripts/changelog.sh X.Y.Z}
|
||||
printf '%s\n' "$version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' || { echo 'Version must be X.Y.Z.' >&2; exit 2; }
|
||||
export CHANGELOG_VERSION="$version"
|
||||
export GITEA_REPOSITORY_URL="${GITEA_REPOSITORY_URL:-http://localhost:3000/owner/bifrost}"
|
||||
export GITEA_REPOSITORY_URL="${GITEA_REPOSITORY_URL:-https://sources.tordais.cc/arnaud.dartois/Bifrost}"
|
||||
python_bin=${PYTHON:-python3}
|
||||
"$python_bin" - <<'PY'
|
||||
import datetime
|
||||
|
||||
@@ -45,6 +45,9 @@ case "$bump" in
|
||||
2) minor=$((minor + 1)); patch=0 ;;
|
||||
1) patch=$((patch + 1)) ;;
|
||||
esac
|
||||
if [ "${1:-}" = "--next-release" ] && [ "$bump" -eq 0 ]; then
|
||||
patch=$((patch + 1))
|
||||
fi
|
||||
next="$major.$minor.$patch"
|
||||
|
||||
case "${1:-}" in
|
||||
|
||||
Reference in new issue
Block a user