From 868e3ac9a265bcb9ccdc0a089367cc806786171f Mon Sep 17 00:00:00 2001 From: Akmal Muhammad Pridianto Date: Sat, 17 Jan 2026 06:26:56 +0700 Subject: [PATCH 1/3] ci: configure CI/CD pipeline and code quality analysis - Add GitHub Actions workflow definitions - Set up SonarQube project properties --- .github/workflows/sonarqube.yml | 22 ++++++++++++++++++++++ sonar-project.properties | 8 ++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/sonarqube.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 0000000..17de35c --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,22 @@ +name: SonarQube Analysis + +on: + pull_request: + branches: [ staging ] + +jobs: + sonarqube: + name: SonarQube Scan + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v6 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..6db0cb7 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,8 @@ +sonar.projectKey=logitrack +sonar.projectName=logitrack + +sonar.sources=crates +sonar.exclusions=**/target/**,**/*.lock + +sonar.sourceEncoding=UTF-8 +sonar.scm.provider=git From 5950c55f3af4f686465a501087393baf374901a4 Mon Sep 17 00:00:00 2001 From: Akmal Muhammad Pridianto Date: Sat, 17 Jan 2026 06:37:52 +0700 Subject: [PATCH 2/3] ci(sonarqube): add Netbird setup and route stabilization Add Netbird Connect action for secure network access and implement 15-second wait for route stabilization before SonarQube scan execution. --- .github/workflows/sonarqube.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 17de35c..caa161d 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -15,6 +15,17 @@ jobs: with: fetch-depth: 0 + - name: Netbird Connect + uses: Alemiz112/netbird-connect@v1 + with: + setup-key: ${{ secrets.NETBIRD_SETUP_KEY }} + + - name: Wait for Netbird Route + run: | + echo "Waiting for Netbird routes to stabilize..." + sleep 15 + sudo netbird status + - name: SonarQube Scan uses: SonarSource/sonarqube-scan-action@v6 env: From e8a3fda6e6161d234f80d15f4639dbb6db3ed7c8 Mon Sep 17 00:00:00 2001 From: Akmal Muhammad Pridianto Date: Sat, 17 Jan 2026 06:44:55 +0700 Subject: [PATCH 3/3] ci(sonarqube): fix source directories for sonar analysis --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 6db0cb7..725535e 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,7 +1,7 @@ sonar.projectKey=logitrack sonar.projectName=logitrack -sonar.sources=crates +sonar.sources=libs,services sonar.exclusions=**/target/**,**/*.lock sonar.sourceEncoding=UTF-8