Skip to content

Commit

Permalink
Sonarcloud github integration
Browse files Browse the repository at this point in the history
  • Loading branch information
groldan committed Dec 1, 2023
1 parent 6fc2b2c commit 92198c0
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/analyze.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Builds and pushes docker images on main and tags

name: Analyze
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
name: Build and Analyze
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Build customized GeoServer version
run: |
make deps
- name: 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=groldan_geoserver-cloud
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<fmt.action>format</fmt.action>
<fmt.skip>false</fmt.skip>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.organization>groldan</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>
<dependencyManagement>
<dependencies>
Expand Down

0 comments on commit 92198c0

Please sign in to comment.