Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.1
7.6.1
34 changes: 34 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

# Controls when the action will run.
on:
push:
branches: [master]
pull_request:
workflow_dispatch:

concurrency:
# Cancel previous actions from the same PR: https://stackoverflow.com/a/72408109
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: bazel-contrib/setup-bazel@0.15.0

- name: bazel build
run: >-
bazel
build
//:sonar_scanner
//:sonarqube_coverage_generator

# TODO Building //docs:docs is not working correctly
Copy link
Contributor Author

@bartoszkosiorek bartoszkosiorek Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is failing with (the same result is with bazel build //docs:docs):

$ bazel aquery ...
Starting local Bazel server and connecting to it...
ERROR: /home/z/dev/bazel-sonarqube/docs/BUILD.bazel:4:8: in deps attribute of starlark_doc_extract rule //docs:docs.extract: missing bzl_library targets for Starlark module(s) @rules_java//java:defs.bzl. Since this rule was created by the macro 'stardoc', the error might have been caused by the macro implementation
ERROR: /home/z/dev/bazel-sonarqube/docs/BUILD.bazel:4:8: Analysis of target '//docs:docs.extract' failed
ERROR: Analysis of target '//docs:docs' failed; build aborted: Analysis failed
INFO: Elapsed time: 4.737s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
Loading: 92 packages loaded
    currently loading: @@bazel_tools//tools/jdk ... (2 packages)
    Fetching repository @@rules_python~; starting
    Fetching repository @@rules_cc~; starting
    Fetching repository @@apple_support~; starting
    Fetching repository @@rules_shell~; starting
    Fetching repository @@local_jdk; starting
    Fetching repository @@rules_java~~toolchains~local_jdk; starting

To resolve it, tons of dependencies needs to be added. The last dependency is private and we are not allowed to use it.

# - name: bazel aquery
# run: >-
# bazel
# aquery
# ...
9 changes: 4 additions & 5 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ module(
repo_name = "bazel_sonarqube",
)

bazel_dep(name = "bazel_skylib", version = "1.7.1", repo_name = "bazel_skylib")
bazel_dep(name = "rules_java", version = "8.11.0")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "rules_java", version = "8.16.1")

bazel_dep(
name = "stardoc",
version = "0.7.2",
dev_dependency = True,
repo_name = "io_bazel_stardoc",
version = "0.8.0",
dev_dependency = True
)

non_module_dependencies = use_extension("//:extensions.bzl", "non_module_dependencies")
Expand Down
Loading