docs: add MIT license and rewrite README (#3)
Build Bifrost / build (push) Failing after 1m50s
Build Bifrost / build (push) Failing after 1m50s
## Summary - Add the MIT license and public repository, source, and issue tracker metadata. - Rewrite the README as a user and contributor guide covering installation, configuration, builds, end-to-end testing, CI, releases, and known limitations. - Clarify that Bifrost creates linked SonarQube projects but does not clone or analyze source code. SonarQube Cloud analysis is intentionally not included yet. ## Validation - `./mvnw -B verify` passed (8 tests). - `make build`, changelog validation, shell syntax check, manifest metadata check, and `git diff --check` passed. Reviewed-on: #3 Co-authored-by: Arnaud Dartois <admin@tordais.cc>
This commit was merged in pull request #3.
This commit is contained in:
1 parent
5e3a73ea42
commit
c9bb94bbc0
5 files changed
+125
-121
No files matched your search
+1
-1
@@ -18,4 +18,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.
|
- 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.
|
- 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,160 +1,125 @@
|
|||||||
# Bifrost
|
# 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).
|
- **License:** MIT ([LICENSE](LICENSE))
|
||||||
- Sonar plugin API: `13.0.0.3026`.
|
- **Project and source:** [sources.tordais.cc/arnaud.dartois/Bifrost](https://sources.tordais.cc/arnaud.dartois/Bifrost)
|
||||||
- Java: 17.
|
- **Issue tracker:** [Gitea issues](https://sources.tordais.cc/arnaud.dartois/Bifrost/issues)
|
||||||
- Artifact: `sonar-bifrost-plugin-<version>.jar`.
|
- **Tested platform:** SonarQube Community Build 25.9.0.112764
|
||||||
- Generated build version: `@PLUGIN_VERSION@`.
|
- **Plugin API:** 13.0.0.3026
|
||||||
- Maven is used because SonarSource publishes the supported plugin packaging extension for Maven.
|
- **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
|
From the **Import from Gitea** page, a user can:
|
||||||
.
|
|
||||||
├── .claude/skills/ # Twelve project skills
|
|
||||||
├── .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
|
|
||||||
```
|
|
||||||
|
|
||||||
## 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
|
## Requirements
|
||||||
make build
|
|
||||||
```
|
|
||||||
|
|
||||||
On Windows, run `mvnw.cmd -B -Drevision=1.2.3 verify`. To force a version manually, pass `-Drevision=1.2.3` to Maven.
|
- 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.
|
||||||
## Docker build
|
- 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.
|
||||||
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.
|
|
||||||
|
|
||||||
## Install and configure
|
## Install and configure
|
||||||
|
|
||||||
1. Copy the JAR to `<sonarqubeHome>/extensions/plugins/` and restart SonarQube. In Docker, mount it at `/opt/sonarqube/extensions/plugins/`.
|
1. Build the plugin or download a JAR from a Gitea release, when one is available.
|
||||||
2. In Administration > Configuration, set Gitea URL and token, selection mode, allowed organizations, and the personal repositories option.
|
2. Copy the JAR from <code>target</code> to <code>$SONARQUBE_HOME/extensions/plugins/</code>.
|
||||||
3. Grant the user the global Create Projects permission.
|
3. Restart SonarQube.
|
||||||
4. Open Import from Gitea, select organizations or All, select repositories, then choose Import.
|
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
|
The Maven Wrapper downloads the pinned Maven 3.9.9 distribution and verifies its checksum. The first build needs network access to Maven Central.
|
||||||
./scripts/e2e.ps1
|
|
||||||
```
|
|
||||||
|
|
||||||
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
|
make build
|
||||||
docker compose --project-name bifrost-e2e down --volumes --remove-orphans
|
|
||||||
```
|
|
||||||
|
|
||||||
## 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`.
|
docker build --build-arg REVISION="$(sh scripts/version.sh)" --target export --output type=local,dest=dist .
|
||||||
- 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`.
|
|
||||||
|
|
||||||
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
|
## CI and releases
|
||||||
|
|
||||||
The Gitea Actions workflow checks out full history/tags, installs Java 17, calculates a version, validates changelog formatting on pull requests, and runs Maven verification. A push to `main` (normally a merged PR) creates a changelog release commit, version tag, and Gitea release with the built JAR attached. Conventional Commit types select major, minor, or patch bumps; other commit types default to a patch so every merge produces a new release. The release commit is excluded from triggering another release.
|
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`. The workflow derives the Gitea API and repository URLs from `github.server_url` and `github.repository`, so no `GITEA_*` repository variables are needed. 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 sources (`actions/checkout`, `actions/setup-java`); an isolated act_runner may need those repositories mirrored or outbound GitHub access.
|
Version bumps follow Conventional Commits:
|
||||||
|
|
||||||
## Skills
|
- 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 `.claude/skills/<name>/SKILL.md` files are project instructions:
|
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-plugin-development`: entry point, extension lifecycle, manifest, and public API constraints.
|
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).
|
||||||
- `sonarqube-frontend-extension`: page API, UI, bundle, and accessibility.
|
|
||||||
- `java-best-practices`: Java 17 boundaries, immutability, resource handling, and errors.
|
|
||||||
- `java-testing`: deterministic unit tests and HTTP mocking.
|
|
||||||
- `gitea-api-client`: Gitea paths, tokens, pagination, timeouts, and status mapping.
|
|
||||||
- `secure-coding-plugin`: URL/input validation, permissions, secrets, CSRF, and dependencies.
|
|
||||||
- `maven-build-packaging`: pinned Maven build and plugin JAR packaging.
|
|
||||||
- `release-versioning-changelog`: tag bumps, changelog structure, and release flow.
|
|
||||||
- `gitea-actions-ci`: act_runner constraints and release workflow.
|
|
||||||
- `docker-test-environment`: pinned SonarQube, PostgreSQL, Gitea, and plugin mount.
|
|
||||||
- `local-e2e-validation`: fresh-stack provisioning, browser import, project/link assertions, and safe cleanup.
|
|
||||||
- `project-workflow`: language, evidence, implementation order, and definition of done.
|
|
||||||
|
|
||||||
When the SonarQube target changes, update version-sensitive skill claims only after checking official SonarSource docs and target source/artifact metadata. Then update API/compiler/manifest pins, rebuild and inspect the JAR, and rerun each checklist. Skills are guidance, not a substitute for version-specific verification.
|
## Changelog
|
||||||
|
|
||||||
## Troubleshooting
|
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.
|
||||||
|
|
||||||
- **Plugin rejected at startup:** verify the JAR manifest `Plugin-Key`, `Plugin-Version`, and `Sonar-Version` against the target API, then inspect `web.log`.
|
Validate the changelog with:
|
||||||
- **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.
|
|
||||||
|
|
||||||
## Limitations and risks
|
sh scripts/check-changelog.sh
|
||||||
|
|
||||||
- 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.
|
## Known limitations
|
||||||
- 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.
|
- Compatibility has been verified on Community Build 25.9.0.112764; other versions are unverified.
|
||||||
- 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.
|
- Bifrost provisions SonarQube projects but does not import source code or start analysis.
|
||||||
- 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.
|
- The end-to-end scenario uses an administrator account. A separate non-admin permission matrix has not been tested.
|
||||||
- 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.
|
- Projects hidden from the current user may affect existing-project detection.
|
||||||
- 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 release job requires its token account to be permitted to push to protected main.
|
||||||
- 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.
|
- No SonarQube Cloud project or Marketplace listing is configured.
|
||||||
- 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.
|
For bugs or feature requests, use the [public issue tracker](https://sources.tordais.cc/arnaud.dartois/Bifrost/issues).
|
||||||
- The Linux shell runner `scripts/e2e.sh` was not exercised on this Windows host. The verified native runner is `./scripts/e2e.ps1`.
|
|
||||||
@@ -6,6 +6,24 @@
|
|||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<packaging>sonar-plugin</packaging>
|
<packaging>sonar-plugin</packaging>
|
||||||
<name>Bifrost</name>
|
<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>
|
<properties>
|
||||||
<revision>0.1.0-SNAPSHOT</revision>
|
<revision>0.1.0-SNAPSHOT</revision>
|
||||||
<maven.compiler.release>17</maven.compiler.release>
|
<maven.compiler.release>17</maven.compiler.release>
|
||||||
@@ -28,7 +46,7 @@
|
|||||||
<finalName>sonar-bifrost-plugin-${revision}</finalName>
|
<finalName>sonar-bifrost-plugin-${revision}</finalName>
|
||||||
<plugins>
|
<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>
|
<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>
|
||||||
<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-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>
|
<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}
|
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; }
|
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 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=${PYTHON:-python3}
|
||||||
"$python_bin" - <<'PY'
|
"$python_bin" - <<'PY'
|
||||||
import datetime
|
import datetime
|
||||||
|
|||||||
Reference in new issue
Block a user