You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by an...@apache.org on 2022/11/23 08:27:57 UTC
[jackrabbit-oak] 01/01: OAK-10009 : Enable SonarClould for Oak
This is an automated email from the ASF dual-hosted git repository.
angela pushed a commit to branch OAK-10009
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit a02e0e77d4925d785e4b7fdc8c754f085c5d29c6
Author: angela <an...@adobe.com>
AuthorDate: Wed Nov 23 09:27:43 2022 +0100
OAK-10009 : Enable SonarClould for Oak
---
.github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++
pom.xml | 2 ++
2 files changed, 38 insertions(+)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000000..a8c0713582
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,36 @@
+name: SonarCloud
+on:
+ push:
+ branches:
+ - trunk
+ pull_request:
+ types: [opened, synchronize, reopened]
+jobs:
+ build:
+ name: Build and analyze
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+ - name: Cache SonarCloud packages
+ uses: actions/cache@v1
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+ - name: Cache Maven packages
+ uses: actions/cache@v1
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Build and analyze
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_jackrabbit-oak
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index d367e5f3dd..ccbefb8d77 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,6 +33,8 @@
<properties>
<skip.deployment>true</skip.deployment>
+ <sonar.organization>apache</sonar.organization>
+ <sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>
<modules>