-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.41 KB
/
teebow1e-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: SonarQube-test
on:
push:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Cache SonarQube packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar-tee
restore-keys: ${{ runner.os }}-sonar-tee
- name: Download SonarScanner
shell: bash
working-directory: .
run: |
curl --insecure -o ./sonarscanner.zip -L https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-linux.zip && unzip -q sonarscanner.zip
wget https://repo1.maven.org/maven2/org/sonarsource/scanner/maven/sonar-maven-plugin/3.11.0.3922/sonar-maven-plugin-3.11.0.3922.jar
- name: SonarQube Analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
shell: bash
working-directory: .
# run: ./sonar-scanner-5.0.1.3006-linux/bin/sonar-scanner -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} -Dsonar.java.binaries=.
run: |
mvn clean install
mvn sonar:sonar -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} -Dsonar.token=${{ secrets.SONAR_TOKEN }}